Fix linter exemptions in golint

We were having issues with golint not properly reporting declaration of functions
without proper documentation (comments). This is due to a config with golangci.

See: https://github.com/golangci/golangci-lint/issues/456
This commit is contained in:
Sargun Dhillon
2020-12-04 21:17:23 -08:00
parent ca84620958
commit bbe4551940
12 changed files with 24 additions and 16 deletions

View File

@@ -19,7 +19,7 @@ import (
"go.opencensus.io/trace"
)
type TracingExporterOptions struct {
type TracingExporterOptions struct { // nolint: golint
Tags map[string]string
ServiceName string
}

View File

@@ -328,7 +328,7 @@ func (p *MockProvider) GetPods(ctx context.Context) ([]*v1.Pod, error) {
return pods, nil
}
func (p *MockProvider) ConfigureNode(ctx context.Context, n *v1.Node) {
func (p *MockProvider) ConfigureNode(ctx context.Context, n *v1.Node) { // nolint:golint
ctx, span := trace.StartSpan(ctx, "mock.ConfigureNode") // nolint:staticcheck,ineffassign
defer span.End()

View File

@@ -13,7 +13,7 @@ type Store struct {
ls map[string]InitFunc
}
func NewStore() *Store {
func NewStore() *Store { // nolint:golint
return &Store{
ls: make(map[string]InitFunc),
}
@@ -71,4 +71,4 @@ type InitConfig struct {
ResourceManager *manager.ResourceManager
}
type InitFunc func(InitConfig) (Provider, error)
type InitFunc func(InitConfig) (Provider, error) // nolint:golint

View File

@@ -7,7 +7,7 @@ const (
OperatingSystemWindows = "Windows"
)
type OperatingSystems map[string]bool
type OperatingSystems map[string]bool // nolint:golint
var (
// ValidOperatingSystems defines the group of operating systems
@@ -18,7 +18,7 @@ var (
}
)
func (o OperatingSystems) Names() []string {
func (o OperatingSystems) Names() []string { // nolint:golint
keys := make([]string, 0, len(o))
for k := range o {
keys = append(keys, k)