diff --git a/.golangci.yml b/.golangci.yml index 9884ab3e7..a3daa9e07 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,6 +22,3 @@ issues: exclude: # EXC0001 errcheck: Almost all programs ignore errors on these functions and in most cases it's ok - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked - - # EXC0003 golint: False positive when tests are defined in package 'test' - - func name will be used as test\.Test.* by other packages, and that stutters; consider calling this diff --git a/cmd/virtual-kubelet/internal/provider/mock/mock.go b/cmd/virtual-kubelet/internal/provider/mock/mock.go index 7696588da..4a059b262 100644 --- a/cmd/virtual-kubelet/internal/provider/mock/mock.go +++ b/cmd/virtual-kubelet/internal/provider/mock/mock.go @@ -42,7 +42,7 @@ var ( */ // MockProvider implements the virtual-kubelet provider interface and stores pods in memory. -type MockProvider struct { +type MockProvider struct { // nolint:golint nodeName string operatingSystem string internalIP string @@ -54,7 +54,7 @@ type MockProvider struct { } // MockConfig contains a mock virtual-kubelet's configurable parameters. -type MockConfig struct { +type MockConfig struct { // nolint:golint CPU string `json:"cpu,omitempty"` Memory string `json:"memory,omitempty"` Pods string `json:"pods,omitempty"` diff --git a/node/node.go b/node/node.go index a5db919f2..5a61c8671 100644 --- a/node/node.go +++ b/node/node.go @@ -46,7 +46,7 @@ const ( // // Note: Implementers can choose to manage a node themselves, in which case // it is not needed to provide an implementation for this interface. -type NodeProvider interface { +type NodeProvider interface { // nolint:golint // Ping checks if the node is still active. // This is intended to be lightweight as it will be called periodically as a // heartbeat to keep the node marked as ready in Kubernetes. @@ -96,7 +96,7 @@ func NewNodeController(p NodeProvider, node *corev1.Node, nodes v1.NodeInterface } // NodeControllerOpt are the functional options used for configuring a node -type NodeControllerOpt func(*NodeController) error +type NodeControllerOpt func(*NodeController) error // nolint:golint // WithNodeEnableLeaseV1Beta1 enables support for v1beta1 leases. // If client is nil, leases will not be enabled. @@ -174,7 +174,7 @@ type ErrorHandler func(context.Context, error) error // NodeController deals with creating and managing a node object in Kubernetes. // It can register a node with Kubernetes and periodically update its status. // NodeController manages a single node entity. -type NodeController struct { +type NodeController struct { // nolint:golint p NodeProvider // serverNode should only be written to on initialization, or as the result of node creation.