MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / StringBytes

Method StringBytes

pkg/util/uuid/uuid.go:145–156  ·  view source on GitHub ↗

StringBytes writes the result of String directly into a buffer, which must have a length of at least 36.

(buf []byte)

Source from the content-addressed store, hash-verified

143// StringBytes writes the result of String directly into a buffer, which must
144// have a length of at least 36.
145func (u UUID) StringBytes(buf []byte) {
146 _ = buf[:36]
147 hex.Encode(buf[0:8], u[0:4])
148 buf[8] = '-'
149 hex.Encode(buf[9:13], u[4:6])
150 buf[13] = '-'
151 hex.Encode(buf[14:18], u[6:8])
152 buf[18] = '-'
153 hex.Encode(buf[19:23], u[8:10])
154 buf[23] = '-'
155 hex.Encode(buf[24:], u[10:])
156}
157
158// SetVersion sets the version bits.
159func (u *UUID) SetVersion(v byte) {

Callers 1

StringMethod · 0.95

Calls 1

EncodeMethod · 0.80

Tested by

no test coverage detected