Skip to content

Commit a43ae55

Browse files
filariowzakisk
authored andcommitted
fix: remove unneeded check
Signed-off-by: Francesco Ilario <filario@redhat.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 5226968 commit a43ae55

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

pkg/formatting/k8labels.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package formatting
33
import (
44
"slices"
55
"strings"
6-
"unicode"
76

87
"k8s.io/apimachinery/pkg/util/validation"
98
)
@@ -84,8 +83,7 @@ func pairs(m map[rune]string) []string {
8483

8584
// isSafe a helper to identify if a rune is safe to process or should be dropped.
8685
func isSafe(r rune) bool {
87-
return !(unicode.IsSpace(r) && r != ' ') &&
88-
(isAllowedSpecialCharLabelValue(r) || isAlphanumeric(r) || isManagedSpecialChar(r))
86+
return isAllowedSpecialCharLabelValue(r) || isAlphanumeric(r) || isManagedSpecialChar(r)
8987
}
9088

9189
// isAlphanumeric returns true if the rune is an alphanumeric value.

0 commit comments

Comments
 (0)