mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
14 lines
1.1 KiB
Go
14 lines
1.1 KiB
Go
//
|
|
// 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/
|
|
|
|
package uuid ;import (_a "crypto/rand";_e "encoding/hex";_bb "io";);func NewUUID ()(UUID ,error ){var uuid UUID ;_ ,_f :=_bb .ReadFull (_g ,uuid [:]);if _f !=nil {return _fd ,_f ;};uuid [6]=(uuid [6]&0x0f)|0x40;uuid [8]=(uuid [8]&0x3f)|0x80;return uuid ,nil ;
|
|
};func (_gb UUID )String ()string {var _cc [36]byte ;_gbb (_cc [:],_gb );return string (_cc [:])};var Nil =_fd ;var _fd UUID ;var _g =_a .Reader ;type UUID [16]byte ;func _gbb (_fe []byte ,_de UUID ){_e .Encode (_fe ,_de [:4]);_fe [8]='-';_e .Encode (_fe [9:13],_de [4:6]);
|
|
_fe [13]='-';_e .Encode (_fe [14:18],_de [6:8]);_fe [18]='-';_e .Encode (_fe [19:23],_de [8:10]);_fe [23]='-';_e .Encode (_fe [24:],_de [10:]);};func MustUUID ()UUID {uuid ,_fb :=NewUUID ();if _fb !=nil {panic (_fb );};return uuid ;}; |