For your convenience: go playground
I has a function which does not care the value type of a map parameter, so I declare it as this:
func foo(generalMap map[string]interface{}) {}
But when I call it with a specified map like this:
myMap := make(map[string]Bar)
foo(myMap)
Then the compiler error comes out:
cannot use myMap (type map[string]Bar) as type map[string]interface {} in argument to foo