Yes, trailing zero-size elements affect the size. https://play.golang.org/p/Ox0FJX3C5V
https://github.com/golang/go/commit/6f07ac2f280847ee0346b871b23cab90869f84a4 On Tue, 2017-07-11 at 20:34 -0700, Rader wrote: > I found the position of `[0]byte` in the struct matters. > type bar2 struct { > A int > _ [0]byte > } > > differs from > > type bar3 struct { > _ [0]byte > A int > } > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.