Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active March 20, 2019 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/9a8561606b71d20b322035338d045878 to your computer and use it in GitHub Desktop.
Save abhirockzz/9a8561606b71d20b322035338d045878 to your computer and use it in GitHub Desktop.
...
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