Closed GoogleCodeExporter closed 9 years ago
Messages don't have default values per se. What you are noticing is just the
standard Go zero type for a struct, which has all the fields set to their zero
type (and a pointer's zero type is nil).
The getter methods explicitly handle nil receivers to make this easier to use.
You can call req.GetOrganization().GetName() to get the default value of the
name field even if req is a nil *Request.
Original comment by dsymo...@golang.org
on 14 Nov 2013 at 9:32
Oh, I was missing that. Makes sense. Thanks!
Original comment by ricardo....@hailocab.com
on 15 Nov 2013 at 10:31
Original issue reported on code.google.com by
ricardo....@hailocab.com
on 14 Nov 2013 at 5:44