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

Method Variant

uuid.go:272–283  ·  uuid.go::UUID.Variant

Variant returns the variant encoded in uuid.

()

Source from the content-addressed store, hash-verified

270
271// Variant returns the variant encoded in uuid.
272func (uuid UUID) Variant() Variant {
273 switch {
274 case (uuid[8] & 0xc0) == 0x80:
275 return RFC4122
276 case (uuid[8] & 0xe0) == 0xc0:
277 return Microsoft
278 case (uuid[8] & 0xe0) == 0xe0:
279 return Future
280 default:
281 return Reserved
282 }
283}
284
285// Version returns the version of uuid.
286func (uuid UUID) Version() Version {

Callers 6

testTestFunction · 0.80
TestRandomUUIDFunction · 0.80
TestRandomUUID_PooledFunction · 0.80
TestNewFunction · 0.80
TestVersion7Function · 0.80
TestVersion7_pooledFunction · 0.80

Calls

no outgoing calls

Tested by 6

testTestFunction · 0.64
TestRandomUUIDFunction · 0.64
TestRandomUUID_PooledFunction · 0.64
TestNewFunction · 0.64
TestVersion7Function · 0.64
TestVersion7_pooledFunction · 0.64