I've written code that is intended to print out keys and values in a map.
kvs := map[string]string{"a": "apple", "b": "banana"}
for k, v := range kvs {
fmt.Println("%s -> %s
", k, v)
}
I'm expecting the output to be:
a -> apple
b -> banana
But the output is actually:
%s -> %s
a apple
%s -> %s
b banana