Skip to content

Commit

Permalink
directly use isvalidpart
Browse files Browse the repository at this point in the history
  • Loading branch information
joshyan1 committed May 30, 2024
1 parent 298c996 commit c365f19
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions types/model/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c365f19

Please sign in to comment.