From c365f195a88cdc5c121878e0dde40274ac71a78e Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Thu, 30 May 2024 16:40:04 -0700 Subject: [PATCH] directly use isvalidpart --- types/model/name.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/types/model/name.go b/types/model/name.go index 2739b53c..d85fd0c6 100644 --- a/types/model/name.go +++ b/types/model/name.go @@ -252,13 +252,7 @@ func (n Name) DisplayShortest() string { } func IsValidNamespace(namespace string) bool { - name := Name{ - Host: "h", - Model: "m", - Namespace: namespace, - Tag: "t", - } - return name.IsValid() + return isValidPart(kindNamespace, namespace) } // IsValid reports whether all parts of the name are present and valid. The