package main
import "fmt"
type CategoryInfo struct {
Value string
Label string
Children []CategoryInfo
}
func main() {
fmt.Println("Hello, 世界")
var ci []CategoryInfo
ci = append(ci, CategoryInfo{
Value: "aaa",
Label: "bbb",
Children: nil,
})
fmt.Println("end ci:", ci)
}
输出:
Hello, 世界
end ci: [{aaa bbb []}]
测试环境:
the go Playground
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。