Browse Source

Rename "v" in "removeVolume"

Guillaume J. Charmes 12 years ago
parent
commit
0c6380cc32
2 changed files with 4 additions and 4 deletions
  1. 2 2
      api.go
  2. 2 2
      server.go

+ 2 - 2
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)

+ 2 - 2
server.go

@@ -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() {