add golangci-lint linter (#5499)

This commit is contained in:
Ondřej Benkovský 2022-07-10 20:06:33 +02:00 committed by GitHub
parent abc5ac8017
commit c2dbb7141a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 83 additions and 184 deletions

View file

@ -96,7 +96,6 @@ var (
func (k *Kubernetes) Services(ctx context.Context, state request.Request, exact bool, opt plugin.Options) (svcs []msg.Service, err error) {
// We're looking again at types, which we've already done in ServeDNS, but there are some types k8s just can't answer.
switch state.QType() {
case dns.TypeTXT:
// 1 label + zone, label must be "dns-version".
t, _ := dnsutil.TrimZone(state.Name(), state.Zone)
@ -216,7 +215,6 @@ func (k *Kubernetes) getClientConfig() (*rest.Config, error) {
}
cc.ContentType = "application/vnd.kubernetes.protobuf"
return cc, err
}
// InitKubeCache initializes a new Kubernetes cache.
@ -542,7 +540,6 @@ func (k *Kubernetes) findServices(r recordRequest, zone string) (services []msg.
for _, eps := range ep.Subsets {
for _, addr := range eps.Addresses {
// See comments in parse.go parseRequest about the endpoint handling.
if r.endpoint != "" {
if !match(r.endpoint, endpointHostname(addr, k.endpointNameMode)) {