Documentation ¶ Index ¶ Variables func ValidatePath(path string) error Constants ¶ This section is empty. Variables ¶ View Source var ( ErrPathTraversal = errors.New("path traversal not allowed") ErrNotAbsolute = errors.New("absolute path required") ErrNullByte = errors.New("path contains null byte") ) Functions ¶ func ValidatePath ¶ func ValidatePath(path string) error ValidatePath checks that a path is absolute and does not escape the filesystem root. It rejects path traversal attempts, null bytes, and relative paths. Types ¶ This section is empty. Source Files ¶ View all Source files pathutil.go Click to show internal directories. Click to hide internal directories.