Skip to content

Commit

Permalink
Use sliceContains to filter the resources by kinds
Browse files Browse the repository at this point in the history
fixes vmware-tanzu#210

Signed-off-by: Daniel Jiang <[email protected]>
  • Loading branch information
reasonerjt committed Aug 9, 2021
1 parent 52d2e6a commit b65815e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (k8sc *Client) _search(ctx context.Context, groups, categories, kinds, name

// filter by resource kind and categories
for _, res := range resources.APIResources {
if len(kinds) > 0 && !strings.Contains(kinds, strings.ToLower(res.Kind)) {
if len(kinds) > 0 && !sliceContains(splitParamList(kinds), strings.ToLower(res.Kind)){
continue
}

Expand Down

0 comments on commit b65815e

Please sign in to comment.