Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active Mar 20, 2019
Embed
What would you like to do?
...
vals, err := parse(b)
if err != nil {
fmt.Println("unable to parse data sent by slack", err)
}
giphyTag := vals.Get("text")
...
func parse(b []byte) (url.Values, error) {
vals, e := url.ParseQuery(string(b))
if e != nil {
fmt.Println("unable to parse", e)
return nil, e
}
return vals, nil
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment