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

Method UnmarshalText

codec.go:188–190  ·  view source on GitHub ↗

Following formats are supported: "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}", "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8" "6ba7b8109dad11d180b400c04fd430c8", "{6ba7b8109dad11d180b400c04fd430c8}", "urn:uuid:6ba7b8109dad11d180b400c04fd430c8" ABNF for su

(b []byte)

Source from the content-addressed store, hash-verified

186//
187// The function delegates validation to internal parseBytes().
188func (u *UUID) UnmarshalText(b []byte) error {
189 return parseBytes(b, u)
190}
191
192// MarshalBinary implements the encoding.BinaryMarshaler interface.
193func (u UUID) MarshalBinary() ([]byte, error) {

Callers 9

ScanMethod · 0.95
TestParseErrorsFunction · 0.95
TestUnmarshalTextMethod · 0.95
TestUnmarshalTextFunction · 0.95
UnmarshalJSONMethod · 0.80
BenchmarkUnmarshalTextFunction · 0.80

Calls 1

parseBytesFunction · 0.85

Tested by 7

TestParseErrorsFunction · 0.76
TestUnmarshalTextMethod · 0.76
TestUnmarshalTextFunction · 0.76
BenchmarkUnmarshalTextFunction · 0.64