From b65815ebc9f868a625998ec2e288dbbf05fe03da Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Mon, 9 Aug 2021 15:46:28 +0800 Subject: [PATCH] Use `sliceContains` to filter the resources by `kinds` fixes #210 Signed-off-by: Daniel Jiang --- k8s/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/client.go b/k8s/client.go index d28a36c7..ded60f94 100644 --- a/k8s/client.go +++ b/k8s/client.go @@ -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 }