I have defined my struct like this this below:
type S_LoginSuccessed struct {
Code int `json:"code"`
Data struct {
User struct {
Sex string `json:"sex"`
IsVip bool `json:"is_vip"`
Name string `json:"name"`
} `json:"user"`
} `json:"data"`
Timestamp int64 `json:"timestamp"`
Message string `json:"message"`
}
And I use this to call it:
success_message := S_LoginSuccessed{123, {{"male", true, "123"}}, time.Now().Unix(), "123"}
I expect it to be success, How ever the VSCode give me this error:
missing type in composite literal