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

Method Variant

uuid.go:300–311  ·  uuid.go::UUID.Variant

Variant returns the variant encoded in uuid.

()

Source from the content-addressed store, hash-verified

298
299// Variant returns the variant encoded in uuid.
300func (uuid UUID) Variant() Variant {
301 switch {
302 case (uuid[8] & 0xc0) == 0x80:
303 return RFC4122
304 case (uuid[8] & 0xe0) == 0xc0:
305 return Microsoft
306 case (uuid[8] & 0xe0) == 0xe0:
307 return Future
308 default:
309 return Reserved
310 }
311}
312
313// Version returns the version of uuid.
314func (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