Golang: satori/go.uuid库生成UUID
导读:文档https://pkg.go.dev/github.com/satori/go.uuidhttps://github.com/satori/go.uuid安装$ go get github.com/satori/go.uuid示例pac...
文档
- https://pkg.go.dev/github.com/satori/go.uuid
- https://github.com/satori/go.uuid
安装
$ go get github.com/satori/go.uuid
示例
package main
import (
"fmt"
uuid "github.com/satori/go.uuid"
)
func main() {
// Creating UUID Version 4
uuid := uuid.NewV4()
fmt.Printf(uuid.String())
// f521f6bb-d809-43ad-8968-ab9e763d0eba
}
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: Golang: satori/go.uuid库生成UUID
本文地址: https://pptw.com/jishu/6146.html
