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
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
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
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