Files
workspace/code/allapp/allapp-go-v3/internal/bootstrap/boots/uniqueid.go
T
2026-04-02 22:07:21 +08:00

13 lines
258 B
Go

package boots
import (
"allapp-go/internal/config"
"allapp-go/pkg/uniqueid"
)
// InitUniqueId 初始化雪花id
func InitUniqueId(cfg *config.Config) {
options := uniqueid.NewIdGeneratorOptions(cfg.UniqueID.WorkerID)
uniqueid.SetIdGenerator(options)
}