Skip to content

miyako/UUID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version platform license downloads

UUID

var $UUID : cs.UUID.UUID
$UUID:=cs.UUID.UUID.new()

$UUIDv7:=$UUID.v7()
$UUIDv6:=$UUID.v6()
$UUIDv5:=$UUID.v5("dns"; "www.4d.com")  //ns:dns,url,oid,x500
$UUIDv4:=$UUID.v4()
$UUIDv3:=$UUID.v3("dns"; "www.4d.com")  //ns:dns,url,oid,x500
$UUIDv1:=$UUID.v1()

dependencies.json

{
   "dependencies": {
   	"UUID": {
   		"github": "miyako/UUID",
   		"version": "^1.0.5"
   	}
   }
}

the CLI uses gofrs/uuid.

Go Build

GOOS=darwin GOARCH=arm64 go build -o uuid-arm main.go
GOOS=darwin GOARCH=amd64 go build -o uuid-amd main.go
lipo -create uuid-arm uuid-amd -output uuid
GOOS=windows GOARCH=amd64 go build -o uuid.exe main.go

CLI

uuid -mode 7 //this is the default
uuid -mode 6
uuid -mode 5 -ns dns -name www.4d.com
uuid -mode 4
uuid -mode 3 -ns dns -name www.4d.com
uuid -mode 1