Quidest?

Non-existent keys in Go maps

· Lorenzo Drumond

In Go maps, looking up a non-existent key doesn’t cause an error; instead, it returns the zero value (zero-values-and-default-values-in-go) of the element type.

References

Next -> sorting-a-slice-in-go

#nil #programming #golang #struct #map #element