I am try to create a map of string slice with the code in GO
newMap := map [string][]string{
"first" : {
"good", "bad"
},
"second" : {
"top", "bottom"
}
}
It seems not to be the right way, what is the wrong with it?
You have to add a comma ,
at the end of each initializer list.
newMap := map [string][]string{
"first" : {
"good", "bad",
},
"second" : {
"top", "bottom",
},
}
You can find a working example here.