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

Function ParseProjectStatus

example/sql_enum.go:61–66  ·  view source on GitHub ↗

ParseProjectStatus attempts to convert a string to a ProjectStatus.

(name string)

Source from the content-addressed store, hash-verified

59
60// ParseProjectStatus attempts to convert a string to a ProjectStatus.
61func ParseProjectStatus(name string) (ProjectStatus, error) {
62 if x, ok := _ProjectStatusValue[name]; ok {
63 return x, nil
64 }
65 return ProjectStatus(0), fmt.Errorf("%s is %w", name, ErrInvalidProjectStatus)
66}
67
68func (x ProjectStatus) Ptr() *ProjectStatus {
69 return &x

Callers 3

TestSQLExtrasFunction · 0.85
UnmarshalTextMethod · 0.85
ScanMethod · 0.85

Calls 1

ProjectStatusTypeAlias · 0.85

Tested by 1

TestSQLExtrasFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…