ParseGreekGod attempts to convert a string to a GreekGod.
(name string)
| 67 | |
| 68 | // ParseGreekGod attempts to convert a string to a GreekGod. |
| 69 | func ParseGreekGod(name string) (GreekGod, error) { |
| 70 | if x, ok := _GreekGodValue[name]; ok { |
| 71 | return x, nil |
| 72 | } |
| 73 | return GreekGod(""), fmt.Errorf("%s is %w", name, ErrInvalidGreekGod) |
| 74 | } |
| 75 | |
| 76 | var errGreekGodNilPtr = errors.New("value pointer is nil") // one per type for package clashes |
| 77 |
searching dependent graphs…