gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/issue-1371.go (about) 1 package main 2 3 import "fmt" 4 5 type node struct { 6 parent *node 7 child []*node 8 key string 9 } 10 11 func main() { 12 root := &node{key: "root"} 13 root.child = nil 14 fmt.Println("root:", root) 15 } 16 17 // Output: 18 // root: &{<nil> [] root}