Skip to content

Commit 1f93cab

Browse files
Fix formatting as required by go vet
1 parent 34e6dff commit 1f93cab

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/k8sclient/k8sclient.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ func parsePodNetworkObjectName(podnetwork string) (string, string, string, error
205205
for i := range allItems {
206206
matched := expr.MatchString(allItems[i])
207207
if !matched && len([]rune(allItems[i])) > 0 {
208-
return "", "", "", logging.Errorf(fmt.Sprintf("parsePodNetworkObjectName: Failed to parse: one or more items did not match comma-delimited format (must consist of lower case alphanumeric characters). Must start and end with an alphanumeric character), mismatch @ '%v'", allItems[i]))
208+
return "", "", "", logging.Errorf("parsePodNetworkObjectName: Failed to parse: one or more items did not match comma-delimited format (must consist of lower case alphanumeric characters). Must start and end with an alphanumeric character), mismatch @ '%v'", allItems[i])
209209
}
210210
}
211211

212212
if len(netIfName) > 0 {
213213
if len(netIfName) > (syscall.IFNAMSIZ-1) || strings.ContainsAny(netIfName, " \t\n\v\f\r/") {
214-
return "", "", "", logging.Errorf(fmt.Sprintf("parsePodNetworkObjectName: Failed to parse interface name: must be less than 15 chars and not contain '/' or spaces. interface name '%s'", netIfName))
214+
return "", "", "", logging.Errorf("parsePodNetworkObjectName: Failed to parse interface name: must be less than 15 chars and not contain '/' or spaces. interface name '%s'", netIfName)
215215
}
216216
}
217217

@@ -298,7 +298,7 @@ func getKubernetesDelegate(client *ClientInfo, net *types.NetworkSelectionElemen
298298
if client != nil {
299299
client.Eventf(pod, v1.EventTypeWarning, "NoNetworkFound", errMsg)
300300
}
301-
return nil, resourceMap, logging.Errorf("getKubernetesDelegate: " + errMsg)
301+
return nil, resourceMap, logging.Errorf("getKubernetesDelegate: %s", errMsg)
302302
}
303303

304304
// Get resourceName annotation from NetworkAttachmentDefinition

pkg/multus/multus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ func delPlugins(exec invoke.Exec, pod *v1.Pod, args *skel.CmdArgs, k8sArgs *type
516516

517517
// Check if we had any errors, and send them all back.
518518
if len(errorstrings) > 0 {
519-
return fmt.Errorf(strings.Join(errorstrings, " / "))
519+
return fmt.Errorf("%s", strings.Join(errorstrings, " / "))
520520
}
521521

522522
return nil

0 commit comments

Comments
 (0)