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 (_b "crypto/rand";_ef "encoding/hex";_g "io";);func (_ag UUID )String ()string {var _gc [36]byte ;_d (_gc [:],_ag );return string (_gc [:])};func MustUUID ()UUID {uuid ,_a :=NewUUID ();if _a !=nil {panic (_a );};return uuid ;};func _d (_fa []byte ,_ba UUID ){_ef .Encode (_fa ,_ba [:4]);
|
|
_fa [8]='-';_ef .Encode (_fa [9:13],_ba [4:6]);_fa [13]='-';_ef .Encode (_fa [14:18],_ba [6:8]);_fa [18]='-';_ef .Encode (_fa [19:23],_ba [8:10]);_fa [23]='-';_ef .Encode (_fa [24:],_ba [10:]);};type UUID [16]byte ;var _c =_b .Reader ;func NewUUID ()(UUID ,error ){var uuid UUID ;
|
|
_ ,_ff :=_g .ReadFull (_c ,uuid [:]);if _ff !=nil {return _gd ,_ff ;};uuid [6]=(uuid [6]&0x0f)|0x40;uuid [8]=(uuid [8]&0x3f)|0x80;return uuid ,nil ;};var Nil =_gd ;var _gd UUID ; |