Skip to content

Instantly share code, notes, and snippets.

@nleiva
Created September 14, 2020 19:30
Show Gist options
  • Save nleiva/980fe11fe71324bbd11e53fb846ac2b4 to your computer and use it in GitHub Desktop.
Save nleiva/980fe11fe71324bbd11e53fb846ac2b4 to your computer and use it in GitHub Desktop.
// Response are the values returned from the module
type Response struct {
Msg string `json:"msg"`
Busy bool `json:"busy"`
Changed bool `json:"changed"`
Failed bool `json:"failed"`
}
func returnResponse(r Response) {
...
response, err = json.Marshal(r)
...
fmt.Println(string(response))
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment