How to correctly assign a map of slices to a struct in Golang? I tried to following, but it does not work:
package main
import (
"fmt"
)
type Test struct {
name string
testCase map[string][]string
}
var t = Test{
name: "myTest",
testCase: map[string][]string{"key": {"value1", "value2"}}
}
func main() {
fmt.Println(t)
}
.\main.go:14:61: syntax error: unexpected newline, expecting comma or }
testCase: map[string][]string{"key":{"value1", "value2"}},. Add it