Reputation: 279
I have the following struct:
type OpList struct {
Name xml.Name `xml:"Ser"`
Servs []Ser `xml:"Ser"`
}
I have a method:
func GetInfo() (*OpList, error){
//If I print here the results gets printed
fmt.Println(OpList.Servs)
return OpList, nil
}
Accessing the list works absolutely fine inside of the method
But when I call this method and try to access it fails with the message: multiple-value in a single value context
bn:=GetInfo()
fmt.Printf(bn.Servs)
I am actually not getting that much information in net as well. How do I access the value returned from a typical method like this?
Upvotes: 0
Views: 716