gutils

package module
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

README

工具类集合 golang

访问主页:https://trako.cn

  • 单元测试
./build-test.sh
  • 单个测试
go test -v -count=1 id.go id_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUnique16Id

func GenUnique16Id() string

GenUnique16Id 生成 16位 绝对唯一 无序 安全ID 高并发、分布式、单机 100% 不重复

func GenUniqueIntID

func GenUniqueIntID() int64

GenUniqueIntID 生成 唯一、无序、分布式安全 的 int64 ID 结构:41bit 纳秒时间戳 | 10bit 进程ID | 6bit 自增序列 | 7bit 强随机数 总长度 64bit = int64 范围

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL