| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | ) |
| 6 | |
| 7 | type A struct { |
| 8 | B map[string]*B |
| 9 | C map[string]*C |
| 10 | } |
| 11 | |
| 12 | type C struct { |
| 13 | D *D |
| 14 | E *E |
| 15 | } |
| 16 | |
| 17 | type D struct { |
| 18 | F *F |
| 19 | G []G |
| 20 | } |
| 21 | |
| 22 | type E struct { |
| 23 | H []H |
| 24 | F *F |
| 25 | } |
| 26 | |
| 27 | type B struct{} |
| 28 | type F struct{} |
| 29 | type G struct{} |
| 30 | type H struct{} |
| 31 | |
| 32 | func main() { |
| 33 | conf := &A{ |
| 34 | B: make(map[string]*B), |
| 35 | C: make(map[string]*C), |
| 36 | } |
| 37 | fmt.Println(conf) |
| 38 | } |
| 39 | |
| 40 | // Output: |
| 41 | // &{map[] map[]} |