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

Method UnmarshalText

marshal.go:17–24  ·  view source on GitHub ↗

UnmarshalText implements encoding.TextUnmarshaler.

(data []byte)

Source from the content-addressed store, hash-verified

15
16// UnmarshalText implements encoding.TextUnmarshaler.
17func (uuid *UUID) UnmarshalText(data []byte) error {
18 id, err := ParseBytes(data)
19 if err != nil {
20 return err
21 }
22 *uuid = id
23 return nil
24}
25
26// MarshalBinary implements encoding.BinaryMarshaler.
27func (uuid UUID) MarshalBinary() ([]byte, error) {

Callers

nothing calls this directly

Calls 1

ParseBytesFunction · 0.85

Tested by

no test coverage detected