Skip to content

Commit 3ed53ae

Browse files
committed
lint
1 parent d32590f commit 3ed53ae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: cmd/minikube/cmd/delete.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,17 @@ func runDelete(cmd *cobra.Command, args []string) {
115115
}
116116
delLabel := fmt.Sprintf("%s=%s", oci.CreatedByLabelKey, "true")
117117
errs := oci.DeleteAllContainersByLabel(oci.Docker, delLabel)
118-
if errs != nil && len(errs) > 0 { // it will error if there is no container to delete
118+
if len(errs) > 0 { // it will error if there is no container to delete
119119
glog.Infof("error delete containers by label %q (might be okay): %+v", delLabel, err)
120120
}
121121

122122
errs = oci.DeleteAllVolumesByLabel(oci.Docker, delLabel)
123-
if errs != nil && len(errs) > 0 { // it will not error if there is nothing to delete
123+
if len(errs) > 0 { // it will not error if there is nothing to delete
124124
glog.Warningf("error delete volumes by label %q (might be okay): %+v", delLabel, errs)
125125
}
126126

127127
errs = oci.PruneAllVolumesByLabel(oci.Docker, delLabel)
128-
if errs != nil && len(errs) > 0 { // it will not error if there is nothing to delete
128+
if len(errs) > 0 { // it will not error if there is nothing to delete
129129
glog.Warningf("error pruning volumes by label %q (might be okay): %+v", delLabel, errs)
130130
}
131131

@@ -194,7 +194,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
194194
delLabel := fmt.Sprintf("%s=%s", oci.ProfileLabelKey, profile.Name)
195195
errs := oci.DeleteAllContainersByLabel(oci.Docker, delLabel)
196196
if errs != nil { // it will error if there is no container to delete
197-
glog.Infof("error deleting containers (might be okay):\n%v", profile.Name, errs)
197+
glog.Infof("error deleting containers for %s (might be okay):\n%v", profile.Name, errs)
198198
}
199199
errs = oci.DeleteAllVolumesByLabel(oci.Docker, delLabel)
200200
if errs != nil { // it will not error if there is nothing to delete
@@ -203,7 +203,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
203203

204204
errs = oci.PruneAllVolumesByLabel(oci.Docker, delLabel)
205205
if errs != nil && len(errs) > 0 { // it will not error if there is nothing to delete
206-
glog.Warningf("error pruning volume (might be okay):\n%v", delLabel, errs)
206+
glog.Warningf("error pruning volume (might be okay):\n%v", errs)
207207
}
208208

209209
api, err := machine.NewAPIClient()

0 commit comments

Comments
 (0)