Variant returns the variant encoded in uuid.
()
| 298 | |
| 299 | // Variant returns the variant encoded in uuid. |
| 300 | func (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. |
| 314 | func (uuid UUID) Version() Version { |
no outgoing calls