MCPcopy Create free account
hub / github.com/abice/go-enum / ParseGreekGod

Function ParseGreekGod

example/sql_str_int_enum.go:69–74  ·  view source on GitHub ↗

ParseGreekGod attempts to convert a string to a GreekGod.

(name string)

Source from the content-addressed store, hash-verified

67
68// ParseGreekGod attempts to convert a string to a GreekGod.
69func 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
76var errGreekGodNilPtr = errors.New("value pointer is nil") // one per type for package clashes
77

Callers 3

IsValidMethod · 0.85
ScanMethod · 0.85
TestSQLStrIntExtrasFunction · 0.85

Calls 1

GreekGodTypeAlias · 0.85

Tested by 1

TestSQLStrIntExtrasFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…