Comment Comment by konart >Add simple conveniences - e.g. "contains" to check if a key is present in a map.Why though? it doesn't even save you much space compared to standard use:if _, ok := m[key]; ok { }vsif contains(m, key) { }I'm not strictly against it, but it can open pandora's box of all kinds of weird sugar flavors. parent konart 4 years ago
Why though? it doesn't even save you much space compared to standard use:
if _, ok := m[key]; ok { }
vs
if contains(m, key) { }
I'm not strictly against it, but it can open pandora's box of all kinds of weird sugar flavors.