Documentation ¶
Index ¶
- Constants
- func BaseUUID() string
- func BytesUUID() []byte
- func HexUUID(upper bool) string
- func ShortID(n int) string
- func ShortIDWithDic(n int, dic string, headDicLen int) (string, error)
- func ShortIDWithError(n int) (string, error)
- func StringUUID() string
- func UpperShortID(n int) string
- func WithPrefix(id string, prefix string) string
Constants ¶
View Source
const (
// DefaultShortNameLen is defult length of short name
DefaultShortNameLen = 8
)
Variables ¶
This section is empty.
Functions ¶
func ShortIDWithDic ¶
ShortIDWithDic generate a shortID with dictionary.
func ShortIDWithError ¶
ShortIDWithError generate a random string with length n
func UpperShortID ¶
UpperShortID generate a random string with length n.
func WithPrefix ¶
WithPrefix add prefix to id if prefix is not empty
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.