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

Method IsValid

example/sql_str_int_enum.go:56–59  ·  view source on GitHub ↗

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

()

Source from the content-addressed store, hash-verified

54// IsValid provides a quick way to determine if the typed value is
55// part of the allowed enumerated values
56func (x GreekGod) IsValid() bool {
57 _, err := ParseGreekGod(string(x))
58 return err == nil
59}
60
61var _GreekGodValue = map[string]GreekGod{
62 "zeus": GreekGodZeus,

Callers

nothing calls this directly

Calls 1

ParseGreekGodFunction · 0.85

Tested by

no test coverage detected