From bad985dc3abd7182455062aaa8ed279fc43881f9 Mon Sep 17 00:00:00 2001 From: aaa <1693291525@qq.com> Date: Wed, 10 Apr 2019 17:41:29 -0400 Subject: [PATCH] Using const() defines constants together --- pkg/kubelet/dockershim/network/plugins.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/kubelet/dockershim/network/plugins.go b/pkg/kubelet/dockershim/network/plugins.go index bc1173b3ff2..f0e0b9a455d 100644 --- a/pkg/kubelet/dockershim/network/plugins.go +++ b/pkg/kubelet/dockershim/network/plugins.go @@ -36,12 +36,14 @@ import ( utilexec "k8s.io/utils/exec" ) -const DefaultPluginName = "kubernetes.io/no-op" +const ( + DefaultPluginName = "kubernetes.io/no-op" -// Called when the node's Pod CIDR is known when using the -// controller manager's --allocate-node-cidrs=true option -const NET_PLUGIN_EVENT_POD_CIDR_CHANGE = "pod-cidr-change" -const NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR = "pod-cidr" + // Called when the node's Pod CIDR is known when using the + // controller manager's --allocate-node-cidrs=true option + NET_PLUGIN_EVENT_POD_CIDR_CHANGE = "pod-cidr-change" + NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR = "pod-cidr" +) // Plugin is an interface to network plugins for the kubelet type NetworkPlugin interface {