Support '!=' operator in filters and record its usage
closes #6021
In Add() (vendor/github.com/docker/docker/api/types/filters/parse.go), we previously assigned args.fields[key][value] = true with "true" being a placeholder.
Now, it holds isEqualOp, a boolean indicating whether the filter uses = (true) or != (false). This enables us to distinguish between inclusion and exclusion filters.
The Set() function (opts/opts.go) has been updated to detect both = and != in filter strings, replacing the previous convention of using a trailing ! to indicate negation.
Update confirmationMessage() function (cli/command/system/prune.go) to include isEqualOp value in print out for prune command.
The daemon is to be updated this issue to support exclusionary filters.
Codecov Report
Attention: Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| opts/opts.go | 0.00% | 11 Missing :warning: |
:loudspeaker: Thoughts on this report? Let us know!