summaryrefslogtreecommitdiff
path: root/api/server
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-03-05 10:51:34 +0100
committerSebastiaan van Stijn <github@gone.nl>2022-04-28 22:39:04 +0200
commit3cae9fef16936e1c987443b6f2545c491f9a1019 (patch)
tree5915bdb47fa9d5bc8f1f323f2a9fb8e61d017e7e /api/server
parent72938574568461ee5e544459a779c5fd4ac14103 (diff)
downloaddocker-3cae9fef16936e1c987443b6f2545c491f9a1019.tar.gz
imports: remove "volumetypes" aliases for api/types/volume
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'api/server')
-rw-r--r--api/server/router/volume/volume_routes.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/server/router/volume/volume_routes.go b/api/server/router/volume/volume_routes.go
index 195bc8b409..5705b08699 100644
--- a/api/server/router/volume/volume_routes.go
+++ b/api/server/router/volume/volume_routes.go
@@ -6,7 +6,7 @@ import (
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types/filters"
- volumetypes "github.com/docker/docker/api/types/volume"
+ "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/volume/service/opts"
"github.com/pkg/errors"
)
@@ -24,7 +24,7 @@ func (v *volumeRouter) getVolumesList(ctx context.Context, w http.ResponseWriter
if err != nil {
return err
}
- return httputils.WriteJSON(w, http.StatusOK, &volumetypes.VolumeListOKBody{Volumes: volumes, Warnings: warnings})
+ return httputils.WriteJSON(w, http.StatusOK, &volume.VolumeListOKBody{Volumes: volumes, Warnings: warnings})
}
func (v *volumeRouter) getVolumeByName(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
@@ -32,11 +32,11 @@ func (v *volumeRouter) getVolumeByName(ctx context.Context, w http.ResponseWrite
return err
}
- volume, err := v.backend.Get(ctx, vars["name"], opts.WithGetResolveStatus)
+ vol, err := v.backend.Get(ctx, vars["name"], opts.WithGetResolveStatus)
if err != nil {
return err
}
- return httputils.WriteJSON(w, http.StatusOK, volume)
+ return httputils.WriteJSON(w, http.StatusOK, vol)
}
func (v *volumeRouter) postVolumesCreate(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
@@ -49,11 +49,11 @@ func (v *volumeRouter) postVolumesCreate(ctx context.Context, w http.ResponseWri
return err
}
- volume, err := v.backend.Create(ctx, req.Name, req.Driver, opts.WithCreateOptions(req.DriverOpts), opts.WithCreateLabels(req.Labels))
+ vol, err := v.backend.Create(ctx, req.Name, req.Driver, opts.WithCreateOptions(req.DriverOpts), opts.WithCreateLabels(req.Labels))
if err != nil {
return err
}
- return httputils.WriteJSON(w, http.StatusCreated, volume)
+ return httputils.WriteJSON(w, http.StatusCreated, vol)
}
func (v *volumeRouter) deleteVolumes(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {