summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proto/id.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/proto/id.go b/proto/id.go
index ae74718..9cb092e 100644
--- a/proto/id.go
+++ b/proto/id.go
@@ -13,7 +13,12 @@ func GenId() string {
t := time.Now().UnixMilli() - epoch.UnixMilli()
id := uint64(t << 6) | uint64(counter.Load() & 63)
counter.Add(1)
- return strconv.FormatUint(id, 36)
+
+ var result string
+ for _, c := range strconv.FormatUint(id, 36) {
+ result = string(c) + result
+ }
+ return result
}
func Timestamp() string {