Bugfix: Add Trimspace to New Objects (#6226)

This commit is contained in:
Gykes
2025-11-26 14:48:56 -06:00
committed by GitHub
parent a8bb9ae4d3
commit 0bd78f4b62
11 changed files with 75 additions and 38 deletions

View File

@@ -44,3 +44,11 @@ func UniqueFold(s []string) []string {
}
return ret
}
// TrimSpace trims whitespace from each string in a slice.
func TrimSpace(s []string) []string {
for i, v := range s {
s[i] = strings.TrimSpace(v)
}
return s
}