[go-nuts] Initializing aliased map

2017-07-07 Thread Kevin Malachowski
Note that the zero value of "aliased" is "nil". If you meant "an empty, newly initialized value" then, as previously mentioned, `make(aliased)` will do it for you, as would `aliased{}`. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubsc

Re: [go-nuts] Initializing aliased map

2017-07-07 Thread Nigel Tao
On Sat, Jul 8, 2017 at 8:08 AM, wrote: > How do I initialize `b` here to have the zero value of `aliased`? To be precise, b is already initialized by default to its zero value, which is nil. If you want a non-nil but empty map, then as Shawn said, you can use "b: make(aliased),". -- You recei

Re: [go-nuts] Initializing aliased map

2017-07-07 Thread Shawn Milochik
b: make(aliased) -- 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/opt

[go-nuts] Initializing aliased map

2017-07-07 Thread krishnan . k . iyer
I was coding something and I just realized that I have a rookie question: type aliased map[string]*Concept type element struct { a bool b aliased } temp := &element{ a: false, b: ?? } How do I initialize `b` here to have the zero value of `aliased`? -- You received this me