omitempty for message in response

This commit is contained in:
Howl 2016-04-03 20:31:51 +02:00
parent 3ddab1de15
commit df793351c0
1 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
package common
// Response is the data that is always returned with an API request.
type Response struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
Code int `json:"code"`
Message string `json:"message,omitempty"`
Data interface{} `json:"data"`
}