提交 b1d139c2 编写于 作者: M Medya Gh

code review comments

上级 d3b86cfe
......@@ -115,7 +115,7 @@ func runDelete(cmd *cobra.Command, args []string) {
}
errs := oci.DeleteAllContainersByLabel(oci.Docker, fmt.Sprintf("%s=%s", oci.CreatedByLabelKey, "true"))
if errs != nil { // it will error if there is no container to delete
glog.Infof("no left over kic container for %s found.", errs)
glog.Infof("no left over minikube container found.", errs)
}
errs = oci.DeleteAllVolumesByLabel(oci.Docker, fmt.Sprintf("%s=%s", oci.CreatedByLabelKey, "true"))
if errs != nil { // it will not error if there is nothing to delete
......
......@@ -65,11 +65,11 @@ func allVolumesByLabel(ociBin string, label string) ([]string, error) {
cmd := exec.Command(ociBin, "volume", "ls", "--filter", "label="+label, "--format", "{{.Name}}")
stdout, err := cmd.Output()
outs := strings.Split(strings.Replace(string(stdout), "\r", "", -1), "\n")
var tirmOuts []string
var vols []string
for _, o := range outs {
tirmOuts = append(tirmOuts, strings.TrimSpace(o))
vols = append(vols, strings.TrimSpace(o))
}
return tirmOuts, err
return vols, err
}
// createDockerVolume creates a docker volume to be attached to the container with correct labels and prefixes based on profile name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册