Documentation
¶
Index ¶
Constants ¶
const MaxNameLen = 255
MaxNameLen is the maximum allowed length for a template name.
Variables ¶
var ErrInvalidName = errors.New("invalid name")
ErrInvalidName indicates a name failed validation.
var ReservedGeneratorNames = []string{"list", "ls", "info", "agent-file"}
ReservedGeneratorNames are names that conflict with "tag generate" subcommands and cannot be used as generator or bundle names.
Functions ¶
func GeneratorName ¶
GeneratorName validates a name for use as a generator or bundle name. It applies PathSegmentSafe checks and rejects names that conflict with "tag generate" subcommands (list, ls, info, agent-file).
func PathSegmentSafe ¶
PathSegmentSafe checks that a string is safe to use as a single path segment. It rejects empty/whitespace-only values, "." and "..", path separators, and path traversal sequences.
func TemplateName ¶
TemplateName validates a name for use as a template/library directory name. It applies PathSegmentSafe checks plus additional constraints: max length, no dot prefix, and no control characters.
Types ¶
This section is empty.