From 77122fd0609de6107a0e5e9054301fe1d08bd534 Mon Sep 17 00:00:00 2001 From: keisku Date: Wed, 8 May 2024 05:16:40 +0000 Subject: [PATCH] Fix: cannot find resource when input exactly equals to resource --- explore/options.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/explore/options.go b/explore/options.go index df148ee..713d6cf 100644 --- a/explore/options.go +++ b/explore/options.go @@ -140,6 +140,11 @@ func (o *Options) Complete(f cmdutil.Factory, args []string) error { return err } + if gvar, ok := gvarMap[o.inputFieldPath]; ok { + o.gvrs = []schema.GroupVersionResource{gvar.GroupVersionResource} + return nil + } + var gvar *groupVersionAPIResource var resourceIdx int for i := len(o.inputFieldPath); i > 0; i-- {