On Wed, May 21, 2014 at 1:17 PM, Ian Lewis <
ian....@crowdsurge.com> wrote:
> So in essence you will need a constructor func(tion) for your struct to
> return a pointer to the newly created object. You can't use the struct
> directly without instantiating it first. This is my understanding so far.
In the OP case, given
type T struct {
Name string
Versions map[byte]version
}
one can initilaize like
instance := &T{Name: "foo", Versions: map[byte]version{}}
ie. a constructor function is not always needed.
-j