Documentation
¶
Index ¶
- func AbsNonBlank(value string) (string, bool, error)
- func CleanRelative(value string) (string, bool)
- func CleanSlashPath(value string) string
- func IsUnsafeRelative(value string) bool
- func MatchSlashGlob(rel, pattern string) bool
- func MatchesAnySlashGlob(rel string, patterns []string) bool
- func NormalizeSlashPattern(value string) string
- func NormalizeSlashPatterns(values []string) []string
- func SlashBase(value string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsNonBlank ¶
AbsNonBlank trims value and resolves it to an absolute path.
func CleanRelative ¶
CleanRelative returns a cleaned, non-empty relative path and rejects paths that would escape their root. It intentionally mirrors the service's conservative historical check where any cleaned ".." prefix is unsafe.
func CleanSlashPath ¶
CleanSlashPath returns a cleaned slash-separated path for stable API output.
func IsUnsafeRelative ¶
IsUnsafeRelative reports whether a path is absolute or escapes upward from a scoped root after cleaning.
func MatchSlashGlob ¶
MatchSlashGlob matches a slash-separated relative path against a user-facing glob/path pattern. It supports direct path/base matches, *, **, prefix/**, and **/suffix forms in addition to filepath.Match checks.
func MatchesAnySlashGlob ¶
MatchesAnySlashGlob reports whether rel matches at least one slash-separated glob pattern using Goncho's filesystem watcher matching semantics.
func NormalizeSlashPattern ¶
NormalizeSlashPattern trims whitespace, converts separators to slashes, and removes a leading ./ prefix from user-facing glob/path patterns.
func NormalizeSlashPatterns ¶
NormalizeSlashPatterns trims, slash-normalizes, de-duplicates, and drops empty user-facing glob/path patterns while preserving first-seen order.
Types ¶
This section is empty.