Given a URL like the following:
http://127.0.0.1:3001/find?fields=hostname,App,Node_type,invalid
I extract fields into a slice like this:
filters := r.URL.Query().Get("fields")
fmt.Println(filters)
Result:
hostname,App,Node_type,invalid
It is received as a string, but I'd prefer to separate the substrings into a sequence.