Disable excluding of issues about comments from golint.

Fix golint issues.
This commit is contained in:
RainbowMango 2020-11-17 10:33:38 +08:00 committed by Kevin Wang
parent e8f189ab36
commit b8197e2855
3 changed files with 6 additions and 0 deletions

View File

@ -41,3 +41,7 @@ linters:
- unused
- varcheck
issues:
# The list of ids of default excludes to include or disable. By default it's empty.
include:
- EXC0002 # disable excluding of issues about comments from golint

View File

@ -18,6 +18,7 @@ import (
"github.com/huawei-cloudnative/karmada/cmd/controller-manager/app/options"
)
// NewLeaderElector builds a leader elector.
func NewLeaderElector(opts *options.Options, fnStartControllers func(*options.Options, <-chan struct{})) (*leaderelection.LeaderElector, error) {
const component = "controller-manager"
rest.AddUserAgent(opts.KubeConfig, "leader-election")

View File

@ -23,6 +23,7 @@ type Options struct {
LeaderElection componentbaseconfig.LeaderElectionConfiguration
}
// NewOptions builds an empty options.
func NewOptions() *Options {
return &Options{}
}