From 03cccd60a641d51c78b4fcc06776c96bc8c43125 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 16 May 2022 20:31:32 +0200 Subject: [PATCH] Reword FQDN normalize errors to not _only_ cover namespaces --- namespaces.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/namespaces.go b/namespaces.go index bb32795..0f92977 100644 --- a/namespaces.go +++ b/namespaces.go @@ -266,21 +266,21 @@ func NormalizeToFQDNRules(name string, stripEmailDomain bool) (string, error) { func CheckForFQDNRules(name string) error { if len(name) > labelHostnameLength { return fmt.Errorf( - "Namespace must not be over 63 chars. %v doesn't comply with this rule: %w", + "DNS segment must not be over 63 chars. %v doesn't comply with this rule: %w", name, errInvalidNamespaceName, ) } if strings.ToLower(name) != name { return fmt.Errorf( - "Namespace name should be lowercase. %v doesn't comply with this rule: %w", + "DNS segment should be lowercase. %v doesn't comply with this rule: %w", name, errInvalidNamespaceName, ) } if invalidCharsInNamespaceRegex.MatchString(name) { return fmt.Errorf( - "Namespace name should only be composed of lowercase ASCII letters numbers, hyphen and dots. %v doesn't comply with theses rules: %w", + "DNS segment should only be composed of lowercase ASCII letters numbers, hyphen and dots. %v doesn't comply with theses rules: %w", name, errInvalidNamespaceName, )