Update go dependencies (#4322)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-07-17 09:21:14 -04:00 committed by GitHub
parent 28cc3bb5e2
commit a54ab3341e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
507 changed files with 50566 additions and 40414 deletions

View file

@ -169,7 +169,12 @@ func (i *Info) String() string {
// Namespaced returns true if the object belongs to a namespace
func (i *Info) Namespaced() bool {
return i.Mapping != nil && i.Mapping.Scope.Name() == meta.RESTScopeNameNamespace
if i.Mapping != nil {
// if we have RESTMapper info, use it
return i.Mapping.Scope.Name() == meta.RESTScopeNameNamespace
}
// otherwise, use the presence of a namespace in the info as an indicator
return len(i.Namespace) > 0
}
// Watch returns server changes to this object after it was retrieved.