How could I get an output of struct, sorted by fields?
type T struct { B int A int } t := &T{B: 2, A: 1} doSomething(t) fmt.Println(t) // &{1 2} --> Sorted by fields
1.4m articles
1.4m replys
5 comments
57.0k users