我正在使用以下結構type Str struct { Info string Command string}并在其中填充數據,我在做下面的工作。 return []Str{ {"info from source", "install && run"}, }現在我需要將命令更改為arraytype Str struct { Info string Command []string}并在數組的新條目中提供每個命令(“安裝”和“運行”),我該怎么做當我嘗試return []Str{ {"info from source",string[]{ {"install}, {"run"}},}我收到缺少類型文字的erorr,知道我做錯了什么
- 1 回答
- 0 關注
- 474 瀏覽
添加回答
舉報
0/150
提交
取消