diff options
Diffstat (limited to 'src/k8splugin/internal/rb/definition.go')
-rw-r--r-- | src/k8splugin/internal/rb/definition.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/k8splugin/internal/rb/definition.go b/src/k8splugin/internal/rb/definition.go index 476e40ee..65ae8e00 100644 --- a/src/k8splugin/internal/rb/definition.go +++ b/src/k8splugin/internal/rb/definition.go @@ -79,8 +79,8 @@ type DefinitionClient struct { func NewDefinitionClient() *DefinitionClient { return &DefinitionClient{ storeName: "rbdef", - tagMeta: "metadata", - tagContent: "content", + tagMeta: "defmetadata", + tagContent: "defcontent", } } @@ -121,10 +121,13 @@ func (v *DefinitionClient) List(name string) ([]Definition, error) { log.Printf("[Definition] Error Unmarshaling value for: %s", key) continue } + //Select only the definitions that match name provided - if def.RBName == name { + //If name is empty, return all + if def.RBName == name || name == "" { results = append(results, def) } + } } |