diff --git a/pkg/client/volumes.go b/pkg/client/volumes.go index f0802b05..90bbd493 100644 --- a/pkg/client/volumes.go +++ b/pkg/client/volumes.go @@ -3,13 +3,14 @@ package client import ( "context" - "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/volume" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" ) -func GetVolumes(cl *client.Client, ctx context.Context, server string, fs filters.Args) ([]*types.Volume, error) { - volumeListOKBody, err := cl.VolumeList(ctx, fs) +func GetVolumes(cl *client.Client, ctx context.Context, server string, fs filters.Args) ([]*volume.Volume, error) { + volumeListOptions := volume.ListOptions{fs} + volumeListOKBody, err := cl.VolumeList(ctx, volumeListOptions) volumeList := volumeListOKBody.Volumes if err != nil { return volumeList, err @@ -18,7 +19,7 @@ func GetVolumes(cl *client.Client, ctx context.Context, server string, fs filter return volumeList, nil } -func GetVolumeNames(volumes []*types.Volume) []string { +func GetVolumeNames(volumes []*volume.Volume) []string { var volumeNames []string for _, vol := range volumes {