I have some code that pulls out the URL parameters from a URL and places it into a map. I can successfully print out the values of the map items that I want to examine.
values := r.URL.Query()
a := values["a"]
fmt.Println(a)
I notice when the values print they print with "[]" surrounding them.
I'd like to value the value of each a,b,c and check to see if it is contained in a comma-delimited string.
allowedA = "value1,value2,value3"
i.e. something similar to:
if(contains(allowedA,a)
Meaning "if the value in 'a' is contained in the variable 'allowedA' then return true.
Any suggestions?