package global

import (
	gonanoid "github.com/matoous/go-nanoid"
	"gofiber.study.skcks.cn/common/config"
)

var NanoIdConfig *config.NanoIdConfig

func GetNanoId() (string, error) {
	return gonanoid.Generate(NanoIdConfig.Sequence, NanoIdConfig.Length)
}
