首页前端开发HTMLGolang: satori/go.uuid库生成UUID

Golang: satori/go.uuid库生成UUID

时间2023-04-23 08:42:02发布访客分类HTML浏览1316
导读:文档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核实处理,我们将尽快回复您,谢谢合作!

Go

若转载请注明出处: Golang: satori/go.uuid库生成UUID
本文地址: https://pptw.com/jishu/6146.html
美国刀片服务器有何独特之处 Golang:colly 采用 Go 语言编写的 Web 爬虫框架

游客 回复需填写必要信息