summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/volumes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/volumes.go')
-rw-r--r--pkg/varlinkapi/volumes.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/varlinkapi/volumes.go b/pkg/varlinkapi/volumes.go
index cbb4a70cc..b0c3608c4 100644
--- a/pkg/varlinkapi/volumes.go
+++ b/pkg/varlinkapi/volumes.go
@@ -6,8 +6,8 @@ import (
"encoding/json"
"github.com/containers/libpod/cmd/podman/shared"
- "github.com/containers/libpod/cmd/podman/varlink"
"github.com/containers/libpod/libpod"
+ iopodman "github.com/containers/libpod/pkg/varlink"
)
// VolumeCreate creates a libpod volume based on input from a varlink connection
@@ -113,11 +113,11 @@ func (i *LibpodAPI) VolumesPrune(call iopodman.VarlinkCall) error {
if err != nil {
return call.ReplyVolumesPrune([]string{}, []string{err.Error()})
}
- for _, i := range responses {
- if i.Err == nil {
- prunedNames = append(prunedNames, i.Id)
+ for k, v := range responses {
+ if v == nil {
+ prunedNames = append(prunedNames, k)
} else {
- prunedErrors = append(prunedErrors, i.Err.Error())
+ prunedErrors = append(prunedErrors, v.Error())
}
}
return call.ReplyVolumesPrune(prunedNames, prunedErrors)