Skip to content
Snippets Groups Projects
Commit 9f0958ef authored by gbe's avatar gbe
Browse files

Tread unreadable countries as "unknown"

parent af0a26f9
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,8 @@ func (i *ISO2CountryCode) UnmarshalBinary(d []byte) error {
}
if len(d) != 2 {
return errors.New("invalid length")
*i = UnknownCountry
return nil
}
*i = ISO2CountryCode{d[0], d[1]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment