Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateShortULID ¶
GenerateShortULID 生成一个自定义长度的 ULID 字符串,最短 18 位,最长 26 位。 若 length < 18,则自动调整为 18;若 length > 26,则自动调整为 26。
func GenerateULID ¶
GenerateULID 生成一个 ULID 字符串,长度为 26 位(标准 ULID 长度)。
func GenerateULIDWithPrefix ¶
GenerateULIDWithPrefix 生成带前缀的 ULID,自动截断保证总长度不超过 maxLen。 若 prefix+ulid 超过 maxLen,则 ulid 部分会被截断。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.