You might be able to use this technique:
https://attilaolah.eu/2014/09/10/json-and-struct-composition-in-go/
--
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
Hi guys,
I would like to have fields in a custom type that :
- are not exported when I mashall them (to send to front)
- are imported when I decode them (from the from)
This is the type :
type Player struct {
Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"`
CustomField