结构可能包含 float32、int32、字符串或指向结构的指针。这是我的代码。但我不知道如何为里面的结构赋值。
type T struct {
A int
B string
C *P
}
type P struct {
A string
B int
}
func main() {
t := T{}
decode(&t, []string{"99", "abc", "abc", "99"})
fmt.Println(t)
}