Remove unused helpers and retired path fields

This commit is contained in:
2026-12-02 21:11:59 +00:00
parent d3b4f25f71
commit 3e0f455b6d
17 changed files with 21 additions and 177 deletions

View File

@@ -38,18 +38,6 @@ func validateRelativeSafePath(fieldName, value string) error {
return nil
}
func validatePathWithinRoot(fieldName, value, root string) error {
normalizedValue := filepath.ToSlash(filepath.Clean(strings.TrimSpace(value)))
normalizedRoot := filepath.ToSlash(filepath.Clean(strings.TrimSpace(root)))
if normalizedValue == normalizedRoot {
return nil
}
if strings.HasPrefix(normalizedValue, normalizedRoot+"/") {
return nil
}
return fmt.Errorf("%s must be under %s/", fieldName, normalizedRoot)
}
func validateDuration(fieldName, value string) error {
trimmed := strings.TrimSpace(value)
if trimmed == "" {