From dd9355c3aa148f13a641544ccee5374d8464bd8f Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Thu, 6 Dec 2018 13:42:17 +0900 Subject: [PATCH] Fix go fmt issue. --- k8sclient/k8sclient.go | 4 ++-- k8sclient/k8sclient_test.go | 2 +- types/conf.go | 6 +++--- types/types.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/k8sclient/k8sclient.go b/k8sclient/k8sclient.go index d599f7284..5b80e9662 100644 --- a/k8sclient/k8sclient.go +++ b/k8sclient/k8sclient.go @@ -38,7 +38,7 @@ import ( const ( resourceNameAnnot = "k8s.v1.cni.cncf.io/resourceName" - defaultNetAnnot = "v1.multus-cni.io/default-network" + defaultNetAnnot = "v1.multus-cni.io/default-network" ) // NoK8sNetworkError indicates error, no network in kubernetes @@ -432,7 +432,7 @@ func TryLoadPodDelegates(k8sArgs *types.K8sArgs, conf *types.NetConf, kubeClient if err != nil { return 0, nil, logging.Errorf("tryLoadK8sDelegates: Err in loading K8s cluster default network from pod annotation: %v", err) } - if delegate != nil{ + if delegate != nil { logging.Debugf("tryLoadK8sDelegates: Overwrite the cluster default network with %v from pod annotations", delegate) conf.Delegates[0] = delegate diff --git a/k8sclient/k8sclient_test.go b/k8sclient/k8sclient_test.go index f6f4c9a13..f07b8b46a 100644 --- a/k8sclient/k8sclient_test.go +++ b/k8sclient/k8sclient_test.go @@ -24,8 +24,8 @@ import ( testutils "github.com/intel/multus-cni/testing" - "github.com/intel/multus-cni/types" "github.com/containernetworking/cni/pkg/skel" + "github.com/intel/multus-cni/types" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/types/conf.go b/types/conf.go index 0aa9f30e2..790cbe606 100644 --- a/types/conf.go +++ b/types/conf.go @@ -27,9 +27,9 @@ import ( ) const ( - defaultCNIDir = "/var/lib/cni/multus" - defaultConfDir = "/etc/cni/multus/net.d" - defaultBinDir = "/opt/cni/bin" + defaultCNIDir = "/var/lib/cni/multus" + defaultConfDir = "/etc/cni/multus/net.d" + defaultBinDir = "/opt/cni/bin" defaultReadinessIndicatorFile = "" ) diff --git a/types/types.go b/types/types.go index 0b46ad4cb..3b7fa6936 100644 --- a/types/types.go +++ b/types/types.go @@ -74,7 +74,7 @@ type DelegateNetConf struct { ConfList types.NetConfList IfnameRequest string `json:"ifnameRequest,omitempty"` MacRequest string `json:"macRequest,omitempty"` - IPRequest string `json:"ipRequest,omitempty"` + IPRequest string `json:"ipRequest,omitempty"` // MasterPlugin is only used internal housekeeping MasterPlugin bool `json:"-"` // Conflist plugin is only used internal housekeeping