omitempty these fields since they can be null (#432)

This commit is contained in:
Reed Allman
2017-10-18 05:31:58 -07:00
committed by Travis Reeder
parent 982e8cf642
commit 5dd4112ee4
2 changed files with 3 additions and 3 deletions

View File

@@ -25,12 +25,12 @@ type Route struct {
Path string `json:"path" db:"path"`
Image string `json:"image" db:"image"`
Memory uint64 `json:"memory" db:"memory"`
Headers Headers `json:"headers" db:"headers"`
Headers Headers `json:"headers,omitempty" db:"headers"`
Type string `json:"type" db:"type"`
Format string `json:"format" db:"format"`
Timeout int32 `json:"timeout" db:"timeout"`
IdleTimeout int32 `json:"idle_timeout" db:"idle_timeout"`
Config Config `json:"config" db:"config"`
Config Config `json:"config,omitempty" db:"config"`
}
// SetDefaults sets zeroed field to defaults.