other people"s project code is as follows
jsonStr := `{"Name":"lepig", "Age":100}`
abc := []byte(jsonStr)
var result []string
if err := json.Unmarshal(abc, &result); err != nil {
fmt.Println(err)
return
}
fmt.Println(result)
in learning golang, look at another project, json parsing, I don"t understand it here. My test code runs with an error. But I can change the
var result [] string
in my test code to var result interface {}
. What I don"t understand is why the var seedUrls [] string
declared in other people"s projects can be
PS: has the foundation of php, so I feel that I can"t understand a lot of things in learning golang quickly. Don"t know how to get started