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
2.1m questions
2.1m answers
60 comments
57.0k users