Answers for "converting key:value to byte slice golang"

Go
0

converting key:value to byte slice golang

func createKey(s []string) string { return fmt.Sprintf("%q", s) }

m := make(map[string]string)
s := []string{"a","b"}
m[createKey(s)] = "myValue"
Posted by: Guest on August-31-2021

Browse Popular Code Answers by Language