Variant returns the variant encoded in uuid.
()
| 270 | |
| 271 | // Variant returns the variant encoded in uuid. |
| 272 | func (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. |
| 286 | func (uuid UUID) Version() Version { |
no outgoing calls