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

lint

上级 b1d139c2
......@@ -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 minikube container found.", errs)
glog.Infof("no left over minikube container found. %v", 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
......
......@@ -48,8 +48,8 @@ func DeleteAllContainersByLabel(ociBin string, label string) []error {
if err != nil {
glog.Infof("error listing containers by label %q: %v", label, err)
}
if cs != nil {
for _, c := range cs {
for _, c := range cs {
if c != "" {
cmd := exec.Command(ociBin, "rm", "-f", "-v", c)
if out, err := cmd.CombinedOutput(); err != nil {
glog.Infof("error deleting container %s: output: %s", c, string(out))
......
......@@ -41,8 +41,8 @@ func DeleteAllVolumesByLabel(ociBin string, label string) []error {
if err != nil {
glog.Infof("error listing volumes by label %q: %v", label, err)
}
if vs != nil {
for _, v := range vs {
for _, v := range vs {
if v != "" {
cmd := exec.Command(ociBin, "volume", "rm", "--force", v)
if out, err := cmd.CombinedOutput(); err != nil {
glog.Infof("error deleting volume %s: output: %s", v, string(out))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册