您当前的位置: 首页 >  ui

彭世瑜

暂无认证

  • 3浏览

    0关注

    2791博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Golang: satori/go.uuid库生成UUID

彭世瑜 发布时间:2022-08-30 10:12:23 ,浏览量:3

文档

  • 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
}

关注
打赏
1665367115
查看更多评论
立即登录/注册

微信扫码登录

0.0875s