Compiler error appending slice to slice

后端 未结 1 1753
情歌与酒
情歌与酒 2021-01-27 17:00

The Go compiler is complaining about my code to append a slice to a slice. Here are relevant excerpts:

type LanidEntry struct {
    lanid   string
    group   st         


        
1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-27 17:52

    You need to use ...:

    lanids = append(lanids, lanids_loaded...)
    

    Also, also please format your code :)

    You should also read Slice Tricks on the Wiki.

    0 讨论(0)
提交回复
热议问题