Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

api/types/volume: add PruneOptions #45370

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
api/types/filters: prevent panic: assignment to entry in nil map
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Nov 25, 2024
commit 3781fd71ec7d8fa535ae42623fdef0b76c154255
3 changes: 3 additions & 0 deletions api/types/filters/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ func (args Args) Get(key string) []string {

// Add a new value to the set of values
func (args Args) Add(key, value string) {
if args.fields == nil {
args.fields = map[string]map[string]bool{}
}
if _, ok := args.fields[key]; ok {
args.fields[key][value] = true
} else {
Expand Down