Compare commits

..

1 Commits

Author SHA1 Message Date
Bobo
9c450415a2 feat: id utils 2025-06-04 22:17:05 +08:00
3 changed files with 11 additions and 1 deletions

View File

@@ -59,3 +59,8 @@ func NewSnowflakeID(workerId int64) (int64, error) {
return node.Generate(), nil
}
func GenerateSnowflakeID(workerId int64) int64 {
id, _ := NewSnowflakeID(workerId)
return id
}

View File

@@ -23,3 +23,8 @@ func NewSonyflakeID() (uint64, error) {
return sf.NextID()
}
func GenerateSonyflakeID() uint64 {
id, _ := NewSonyflakeID()
return id
}

View File

@@ -5,7 +5,7 @@ git tag geoip/v1.1.5
git tag translator/v1.1.2
git tag copierutil/v0.0.5
git tag jwtutil/v0.0.2
git tag id/v0.0.1
git tag id/v0.0.2
git tag slug/v0.0.1
git tag entgo/v1.1.30