cleaning up
parent
c8084e43b8
commit
147a646e6a
|
|
@ -130,7 +130,10 @@ func (b *Base) List(ns string) (Columnars, error) {
|
||||||
// Describe a given resource.
|
// Describe a given resource.
|
||||||
func (b *Base) Describe(kind, pa string) (string, error) {
|
func (b *Base) Describe(kind, pa string) (string, error) {
|
||||||
mapping, err := k8s.RestMapping.Find(kind)
|
mapping, err := k8s.RestMapping.Find(kind)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
|
return b.doDescribe(pa, mapping)
|
||||||
|
}
|
||||||
|
|
||||||
resource, ok := b.Resource.(*k8s.Resource)
|
resource, ok := b.Resource.(*k8s.Resource)
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Debug().Msgf("resource not a (*k8s.Resource) and %s", err)
|
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)
|
log.Debug().Err(e).Msgf("Unable to find mapper for %s %s", kind, pa)
|
||||||
return "", e
|
return "", e
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return b.doDescribe(pa, mapping)
|
return b.doDescribe(pa, mapping)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue