cleaning up

mine
derailed 2019-07-19 20:26:49 -06:00
parent c8084e43b8
commit 147a646e6a
1 changed files with 16 additions and 14 deletions

View File

@ -130,7 +130,10 @@ func (b *Base) List(ns string) (Columnars, error) {
// Describe a given resource.
func (b *Base) Describe(kind, pa string) (string, error) {
mapping, err := k8s.RestMapping.Find(kind)
if err != nil {
if err == nil {
return b.doDescribe(pa, mapping)
}
resource, ok := b.Resource.(*k8s.Resource)
if !ok {
log.Debug().Msgf("resource not a (*k8s.Resource) and %s", err)
@ -144,7 +147,6 @@ func (b *Base) Describe(kind, pa string) (string, error) {
log.Debug().Err(e).Msgf("Unable to find mapper for %s %s", kind, pa)
return "", e
}
}
return b.doDescribe(pa, mapping)
}