package id_generator import ( "fmt" "math/rand" "strings" "time" ) func GenSnNum() string { a := fmt.Sprintf("%s%.8d", time.Now().Format("20060102150405.000"), rand.Intn(1000000)) return strings.ReplaceAll(a, ".", "") }