Skip to content

Instantly share code, notes, and snippets.

@xealgo
Created November 28, 2017 01:05
Show Gist options
  • Save xealgo/aac4be0e9f276634a67d7ca9287b5a81 to your computer and use it in GitHub Desktop.
Save xealgo/aac4be0e9f276634a67d7ca9287b5a81 to your computer and use it in GitHub Desktop.
type Request struct {
ID int `json:"id"`
...
}
func (req *Request) Log() map[string]interface{} {
return map[string]interface{
"id": req.ID,
...
}
}
.....
logservice.Error(req)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment