There is handy shortcut for dictionaries in python - setdefault method. For example, if I have dict that represents mapping from string to list, I can write something like this
if key not in map:
map[key] = []
map[key].append(value)
this is too verbose and more pythonic way to do this is like so:
map.setdefault(key, []).append(value)
there is a defaultdict class, by the way.
So my question is - is there something similar for maps in Go? I'm really annoyed working with types like map[string][]int and similar.