The way to deal with this is to define (and export) a type which contains the hidden fields: https://play.golang.org/p/ClDxKPcNNzZ
Clearly, the user of this type in another package won't be able to access the hidden fields - so usually you'd also export some sort of constructor function. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/77d30f9a-60d7-4b8f-83f4-dd123dddc11dn%40googlegroups.com.