Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmpty = errors.New("empty") ErrTooLong = errors.New("too long") ErrInvalidChars = errors.New("contains invalid characters") )
View Source
var (
IDMaxLen = 50 // maximum length of an ID
)
Functions ¶
func SanitizeID ¶
func ValidateID ¶
ValidateID checks if an ID is valid. It returns an error if the ID contains invalid characters, is empty, or is too long. The maxLen parameter is the maximum length of the ID. If maxLen is 0, the ID length is not checked.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.