Mercurial > gemma
diff pkg/models/isrs.go @ 5601:1222b777f51f
Made golint finally happy.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 06 Aug 2022 02:09:57 +0200 |
parents | 15c9d4064f0f |
children |
line wrap: on
line diff
--- a/pkg/models/isrs.go Sat Aug 06 00:46:21 2022 +0200 +++ b/pkg/models/isrs.go Sat Aug 06 02:09:57 2022 +0200 @@ -30,6 +30,7 @@ Hectometre int } +// UnmarshalJSON implements the json.Unmarshaler interface. func (isrs *Isrs) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { @@ -43,6 +44,7 @@ return nil } +// Less orders two Isrs codes. func (isrs *Isrs) Less(other *Isrs) bool { if isrs.CountryCode < other.CountryCode { return true @@ -74,6 +76,7 @@ return false } +// MarshalJSON implements the json.Marshaler interface. func (isrs *Isrs) MarshalJSON() ([]byte, error) { if isrs == nil { return nil, nil