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

Method UnmarshalText

example/sql_enum.go:78–86  ·  view source on GitHub ↗

UnmarshalText implements the text unmarshaller method.

(text []byte)

Source from the content-addressed store, hash-verified

76
77// UnmarshalText implements the text unmarshaller method.
78func (x *ProjectStatus) UnmarshalText(text []byte) error {
79 name := string(text)
80 tmp, err := ParseProjectStatus(name)
81 if err != nil {
82 return err
83 }
84 *x = tmp
85 return nil
86}
87
88// AppendText appends the textual representation of itself to the end of b
89// (allocating a larger slice if necessary) and returns the updated slice.

Callers

nothing calls this directly

Calls 1

ParseProjectStatusFunction · 0.85

Tested by

no test coverage detected