2 Star 15 Fork 10

北京小程科技有限公司/Go通用工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
uuid.go 201 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2019-07-24 14:07 +08:00 . 添加生成UUID的方法。
package basic
import (
"encoding/hex"
"github.com/google/uuid"
)
// 生成32位UUID
func UUIDString() string {
u := uuid.New()
var buf [32]byte
hex.Encode(buf[:], u[:])
return string(buf[:])
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/xiaochengtech/common.git
git@gitee.com:xiaochengtech/common.git
xiaochengtech
common
Go通用工具
82269be32710

搜索帮助