安装依赖
go get github.com/google/uuid
使用方法
import "github.com/google/uuid"
uid := uuid.New()
key := uid.String()
生成的 UUID 数据格式
4738c1d9-04ce-46a5-a49f-7cc2b9f061e2
go get github.com/google/uuid
import "github.com/google/uuid"
uid := uuid.New()
key := uid.String()
4738c1d9-04ce-46a5-a49f-7cc2b9f061e2