1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 11:48:38 -04:00

constants.go: Make Valid() return false after failing FromString()

This commit is contained in:
2017-04-06 19:55:59 -04:00
parent 85406e7eb8
commit 3009f9255c
2 changed files with 40 additions and 0 deletions

View File

@ -95,6 +95,7 @@ func (e *{enumLower}) FromString(in string) error {{
return nil
}}
}}
*e = 0
return errors.New("Invalid {enum}: \\\"" + in + "\\\"")
}}