MCPcopy Create free account
hub / github.com/dolthub/doltgresql / decodeBraced

Method decodeBraced

postgres/parser/uuid/codec.go:182–190  ·  view source on GitHub ↗

decodeBraced decodes UUID strings that are using the following formats: "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}" "{6ba7b8109dad11d180b400c04fd430c8}".

(t []byte)

Source from the content-addressed store, hash-verified

180// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}"
181// "{6ba7b8109dad11d180b400c04fd430c8}".
182func (u *UUID) decodeBraced(t []byte) error {
183 l := len(t)
184
185 if t[0] != '{' || t[l-1] != '}' {
186 return fmt.Errorf("uuid: incorrect UUID format %s", t)
187 }
188
189 return u.decodePlain(t[1 : l-1])
190}
191
192// decodeURN decodes UUID strings that are using the following formats:
193//

Callers 1

UnmarshalTextMethod · 0.95

Calls 2

decodePlainMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected