2021-08-13 01:33:42 +00:00
|
|
|
//
|
|
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
|
|
//
|
|
|
|
// This is a commercial product and requires a license to operate.
|
|
|
|
// A trial license can be obtained at https://unidoc.io
|
|
|
|
//
|
|
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
|
|
|
|
2024-09-14 00:10:30 +00:00
|
|
|
package uuid ;import (_f "crypto/rand";_b "encoding/hex";_fg "io";);var _a =_f .Reader ;func MustUUID ()UUID {uuid ,_cb :=NewUUID ();if _cb !=nil {panic (_cb );};return uuid ;};func _bc (_fa []byte ,_d UUID ){_b .Encode (_fa ,_d [:4]);_fa [8]='-';_b .Encode (_fa [9:13],_d [4:6]);
|
|
|
|
_fa [13]='-';_b .Encode (_fa [14:18],_d [6:8]);_fa [18]='-';_b .Encode (_fa [19:23],_d [8:10]);_fa [23]='-';_b .Encode (_fa [24:],_d [10:]);};func (_e UUID )String ()string {var _g [36]byte ;_bc (_g [:],_e );return string (_g [:])};type UUID [16]byte ;
|
|
|
|
var _fb UUID ;var Nil =_fb ;func NewUUID ()(UUID ,error ){var uuid UUID ;_ ,_af :=_fg .ReadFull (_a ,uuid [:]);if _af !=nil {return _fb ,_af ;};uuid [6]=(uuid [6]&0x0f)|0x40;uuid [8]=(uuid [8]&0x3f)|0x80;return uuid ,nil ;};
|