Backport some OSS changes (#10267)

* Backport some OSS changes

* go mod vendor
This commit is contained in:
Brian Kassouf
2020-10-29 16:47:34 -07:00
committed by GitHub
parent ece971b648
commit 3bc7d15e6b
36 changed files with 5350 additions and 64 deletions

View File

@@ -28,10 +28,10 @@ var (
func (n *Namespace) HasParent(possibleParent *Namespace) bool {
switch {
case n.Path == "":
return false
case possibleParent.Path == "":
return true
case n.Path == "":
return false
default:
return strings.HasPrefix(n.Path, possibleParent.Path)
}