Vote count: 0
Trying to get acquainted with go. I want to do something like this:
func validation(){
headers := metadata.New(map[string]string{"auth":"", "abc": "", "org" : ""})
token := headers["authorization"]
data.Add("cookie", token)
}
I am getting the following error cannot use token (type []string) as type string in argument to data.Add. Has this error got to do anything with the metadata(map) I have inside the function?
asked 35 secs ago
Go error: Cannot use argument (type []string) as type string in argument
Aucun commentaire:
Enregistrer un commentaire