fix wrong json tag (#2193)

json tags are case sensitive when encode, change omitEmpty to omitempty
This commit is contained in:
Oilbeater 2018-03-12 18:36:35 +08:00 committed by Manuel Alejandro de Brito Fontes
parent 36cce00fdd
commit ebcdfade8e
3 changed files with 10 additions and 10 deletions

View file

@ -35,7 +35,7 @@ type Config struct {
Host string `json:"host"`
SigninURL string `json:"signinUrl"`
Method string `json:"method"`
ResponseHeaders []string `json:"responseHeaders,omitEmpty"`
ResponseHeaders []string `json:"responseHeaders,omitempty"`
RequestRedirect string `json:"requestRedirect"`
}

View file

@ -32,7 +32,7 @@ import (
// SourceRange returns the CIDR
type SourceRange struct {
CIDR []string `json:"cidr,omitEmpty"`
CIDR []string `json:"cidr,omitempty"`
}
// Equal tests for equality between two SourceRange types