-
-
Save SrDios/78baefb7e638fa75d2fbb41df89bd71b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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