This commit is contained in:
2025-04-20 00:32:41 +10:00
commit 9a098b205a
26 changed files with 1839 additions and 0 deletions

15
utils/clean.go Normal file
View File

@ -0,0 +1,15 @@
package utils
import (
"regexp"
"strings"
)
func CleanDirName(input string) string {
re := regexp.MustCompile(`[<>:"/\\|?*\x00-\x1F]`)
cleaned := re.ReplaceAllString(input, "_")
cleaned = strings.TrimSpace(cleaned)
return cleaned
}