package main
import (
"fmt"
)
func main() {
type MyStruct struct {
S []MyStruct
str string
}
var s MyStruct
for i := 1; i <= 3; i++ {
s.S = append(s.S, MyStruct{})
}
slice2 := s.S
slice2 = append(slice2, MyStruct{str: "测试字符串"})
s.S[0].S = slice2
fmt.Printf("s.S:%v\n", pretty.Formatter(s.S))
}
it will fatal error: stack overflow