MCPcopy
hub / github.com/google/uuid / UnmarshalText

Method UnmarshalText

null.go:89–98  ·  view source on GitHub ↗

UnmarshalText implements encoding.TextUnmarshaler.

(data []byte)

Source from the content-addressed store, hash-verified

87
88// UnmarshalText implements encoding.TextUnmarshaler.
89func (nu *NullUUID) UnmarshalText(data []byte) error {
90 id, err := ParseBytes(data)
91 if err != nil {
92 nu.Valid = false
93 return err
94 }
95 nu.UUID = id
96 nu.Valid = true
97 return nil
98}
99
100// MarshalJSON implements json.Marshaler.
101func (nu NullUUID) MarshalJSON() ([]byte, error) {

Callers

nothing calls this directly

Calls 1

ParseBytesFunction · 0.85

Tested by

no test coverage detected