summaryrefslogtreecommitdiff
path: root/pkg/bindings/volumes/volumes.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-02-21 12:32:42 -0600
committerBrent Baude <bbaude@redhat.com>2020-02-21 16:11:39 -0600
commitf0df07b5931b256b0ddadb80a8357985038cfe26 (patch)
tree5bc5132d488fe285d64d6b517d587a8c68ea38cd /pkg/bindings/volumes/volumes.go
parentf51cf8546d17c68f5ade1b4c8558d120c583316e (diff)
downloadpodman-f0df07b5931b256b0ddadb80a8357985038cfe26.tar.gz
podman-f0df07b5931b256b0ddadb80a8357985038cfe26.tar.bz2
podman-f0df07b5931b256b0ddadb80a8357985038cfe26.zip
add more image tests for go bindings
adding more image tests for go bindings. one big change is that the params were converted from map[string]string to url.values to account for the ability to send []string as query params Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings/volumes/volumes.go')
-rw-r--r--pkg/bindings/volumes/volumes.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/bindings/volumes/volumes.go b/pkg/bindings/volumes/volumes.go
index 8313a7460..7f6a9cc9b 100644
--- a/pkg/bindings/volumes/volumes.go
+++ b/pkg/bindings/volumes/volumes.go
@@ -3,6 +3,7 @@ package volumes
import (
"context"
"net/http"
+ "net/url"
"strconv"
"github.com/containers/libpod/libpod"
@@ -73,9 +74,9 @@ func Remove(ctx context.Context, nameOrID string, force *bool) error {
if err != nil {
return err
}
- params := make(map[string]string)
+ params := url.Values{}
if force != nil {
- params["force"] = strconv.FormatBool(*force)
+ params.Set("force", strconv.FormatBool(*force))
}
response, err := conn.DoRequest(nil, http.MethodPost, "/volumes/%s/prune", params, nameOrID)
if err != nil {