mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Rename "v" in "removeVolume"
This commit is contained in:
parent
2a303dab85
commit
0c6380cc32
2 changed files with 4 additions and 4 deletions
4
api.go
4
api.go
|
@ -411,9 +411,9 @@ func deleteContainers(srv *Server, w http.ResponseWriter, r *http.Request, vars
|
|||
return nil, fmt.Errorf("Missing parameter")
|
||||
}
|
||||
name := vars["name"]
|
||||
v := r.Form.Get("v") == "1"
|
||||
removeVolume := r.Form.Get("removeVolume") == "1"
|
||||
|
||||
if err := srv.ContainerDestroy(name, v); err != nil {
|
||||
if err := srv.ContainerDestroy(name, removeVolume); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
|
|
@ -413,7 +413,7 @@ func (srv *Server) ContainerRestart(name string, t int) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (srv *Server) ContainerDestroy(name string, v bool) error {
|
||||
func (srv *Server) ContainerDestroy(name string, removeVolume bool) error {
|
||||
|
||||
if container := srv.runtime.Get(name); container != nil {
|
||||
volumes := make(map[string]struct{})
|
||||
|
@ -425,7 +425,7 @@ func (srv *Server) ContainerDestroy(name string, v bool) error {
|
|||
return fmt.Errorf("Error destroying container %s: %s", name, err.Error())
|
||||
}
|
||||
|
||||
if v {
|
||||
if removeVolume {
|
||||
// Retrieve all volumes from all remaining containers
|
||||
usedVolumes := make(map[string]*Container)
|
||||
for _, container := range srv.runtime.List() {
|
||||
|
|
Loading…
Add table
Reference in a new issue