I'm trying to define an array in struct in Go, devices array should have 3 items of type strings, but I can't find out how to print values of devices array
Below outputs "mismatched types string and [2]string". Any hints?
type Nodes struct {
Nodes []Node `json:"nodes"`
}
type Node struct {
devices [2]string `json:"devices"`
}
var nodes Nodes
fmt.Println("Device: %+v" + nodes.Nodes[i].devices)