Files
moxa/_test/struct22.go
2019-07-09 00:08:12 +02:00

16 lines
169 B
Go

package main
type S struct {
Child *S
Name string
}
func main() {
s := &S{Name: "root"}
s.Child = &S{Name: "child"}
println(s.Child.Name)
}
// Output:
// child