Skip to content

Instantly share code, notes, and snippets.

@SrDios SrDios/addKongsumer.go Secret
Created Oct 23, 2018

Embed
What would you like to do?
func addKongConsumer(consumer string) {
resp, err := http.PostForm(KongURL+"consumers/", url.Values{"username": {consumer}, "custom_id": {consumer}})
if err != nil {
color.R.Printf(err.Error())
} else {
_, err := ioutil.ReadAll(resp.Body)
if err != nil {
color.R.Printf(err.Error())
}
color.G.Printf("Add Consumer with name %s\n", consumer)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.