I have a deeply nested struct which contains two slices, as seen below:
package main
import "fmt"
type bar struct {
v1 []int
v2 []int
}
type foo struct{ bar bar }
type tar struct{ foo foo }
func main() {
f := &tar{foo: foo{bar: bar{v1: [2], v2: [3]}}}
fmt.Printf("Hello, playground %s", f)
}
How do I initialize the two slices? Or how do I get this code working?
Here is the Golang Play for it: http://play.golang.org/p/zLutROI4YH.