What is the difference

what is the difference between:

map[string]string and

map[string]string{}

I’d hazard… the first one relates to a type (non instantiated value), and the second is an empty map where key and value are a string…

The second line creates an instance of the type map[string]string, the first line is just the type signature.

2 Likes