Documentation
¶
Overview ¶
Package util 提供 Hexagon 框架的内部工具函数
本包是内部实现,不对外暴露。主要功能:
- ID 生成:使用 toolkit/util/idgen 生成各类唯一标识
- 随机字符串:生成随机字符串和十六进制字符串
注意:本包遵循基础设施复用原则,所有 ID 生成都使用 toolkit 提供的实现
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateID ¶
GenerateID generates a unique ID with the given prefix. Format: {prefix}-{nanoid} Example: agent-Uakgb_J5m9g
func GenerateIDLong ¶
GenerateIDLong generates a longer unique ID with the given prefix. Format: {prefix}-{nanoid_16} Example: agent-Uakgb_J5m9g-abcd
func RandomHex ¶
RandomHex generates a random hex string. For compatibility, this uses NanoID with hex alphabet.
func RandomString ¶
RandomString generates a random string of the given length. Delegates to toolkit's NanoID implementation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.