Commit c365f195 authored by Josh Yan's avatar Josh Yan
Browse files

directly use isvalidpart

parent 298c996e
...@@ -252,13 +252,7 @@ func (n Name) DisplayShortest() string { ...@@ -252,13 +252,7 @@ func (n Name) DisplayShortest() string {
} }
func IsValidNamespace(namespace string) bool { func IsValidNamespace(namespace string) bool {
name := Name{ return isValidPart(kindNamespace, namespace)
Host: "h",
Model: "m",
Namespace: namespace,
Tag: "t",
}
return name.IsValid()
} }
// IsValid reports whether all parts of the name are present and valid. The // IsValid reports whether all parts of the name are present and valid. The
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment