Files
2026-04-25 04:53:15 +08:00

17 lines
219 B
Go

package utils
import (
"crypto/rand"
"fmt"
"math/big"
)
func GenCode() string {
n, err := rand.Int(rand.Reader, big.NewInt(1000000))
if err != nil {
return "000000"
}
return fmt.Sprintf("%06d", n.Int64())
}