Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed: string representation for "not in" filter comparator should show array #133

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

kcarrasco-panw
Copy link
Contributor

This PR fixes the following bug:
Given the following filter:

f := elemental.NewFilter().WithKey("name").NotIn("abc001", "abc002").Done()

The f.String() representation only shows the first element:

(name not in "abc001")

The correct, expected representation is:

(name not in ["abc001", "abc002"])

Which is analogous to the behaviour of the In comparator:

f := elemental.NewFilter().WithKey("name").In("abc001", "abc002").Done()

which returns the following f.String() representation:

(name in ["abc001", "abc002"])

@kcarrasco-panw kcarrasco-panw self-assigned this Nov 16, 2023
axionfield

This comment was marked as duplicate.

@primalmotion primalmotion merged commit 3d09d6d into master Nov 16, 2023
2 checks passed
@primalmotion primalmotion deleted the CNS-8198-resource-exclusion-based-on-name branch November 16, 2023 20:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants