From bbd2919901ae83e7447fe9ea83407b79d6486d55 Mon Sep 17 00:00:00 2001 From: Casey Davenport Date: Tue, 26 Nov 2024 10:12:24 -0800 Subject: [PATCH] Fix formatting --- cni-plugin/pkg/install/install.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cni-plugin/pkg/install/install.go b/cni-plugin/pkg/install/install.go index 09e108805f5..57f0ae67840 100644 --- a/cni-plugin/pkg/install/install.go +++ b/cni-plugin/pkg/install/install.go @@ -306,8 +306,8 @@ func isValidJSON(s string) error { // Convert permission string to fileMode for testing purposes func stringToFileMode(permString string) (os.FileMode, error) { - perm, err := strconv.ParseUint(permString, 8, 32) - return os.FileMode(perm), err + perm, err := strconv.ParseUint(permString, 8, 32) + return os.FileMode(perm), err } func writeCNIConfig(c config) { @@ -390,9 +390,9 @@ func writeCNIConfig(c config) { permString := getEnv("TEST_FILE_PERMISSION", "0600") logrus.Infof("CNI config file permission is set to %s\n", permString) perm, err := stringToFileMode(permString) - if err != nil { - logrus.Fatal(err) - } + if err != nil { + logrus.Fatal(err) + } name := getEnv("CNI_CONF_NAME", "10-calico.conflist") path := winutils.GetHostPath(fmt.Sprintf("/host/etc/cni/net.d/%s", name))