directly use isvalidpart

This commit is contained in:
Josh Yan 2024-05-30 16:40:04 -07:00
parent 298c996e54
commit c365f195a8

View file

@ -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