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

Method MarshalText

marshal.go:10–14  ·  view source on GitHub ↗

MarshalText implements encoding.TextMarshaler.

()

Source from the content-addressed store, hash-verified

8
9// MarshalText implements encoding.TextMarshaler.
10func (uuid UUID) MarshalText() ([]byte, error) {
11 var js [36]byte
12 encodeHex(js[:], uuid)
13 return js[:], nil
14}
15
16// UnmarshalText implements encoding.TextUnmarshaler.
17func (uuid *UUID) UnmarshalText(data []byte) error {

Callers 2

TestNullUUIDMarshalTextFunction · 0.45

Calls 1

encodeHexFunction · 0.85

Tested by 2

TestNullUUIDMarshalTextFunction · 0.36