3 ms·
Yeah. The only caveat I'd give is a bit of a stretch. Not explicitly error handling, but you can lookup maps as: j := m["root"] or j, ok := m["root"] Agai
by Tobani 12y ago
Yeah. The only caveat I'd give is a bit of a stretch. Not explicitly error handling, but you can lookup maps as:
j := m["root"]
or
j, ok := m["root"]
Again, this tangential to the subject at hand. But this is the main reason I qualify that statement.
- NateDad 12y agoThat's a very good point, actually. It's tricky, because always requiring the latter format is burdensome, especially if the zero value of the map is an ok value for you...