Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.4.0
version: v2.5.0
- name: modernize
run: go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@2e31135b736b96cd609904370c71563ce5447826 -diff -test ./... # v0.20.0
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ linters:
- canonicalheader
- copyloopvar
- durationcheck
- godoclint
- govet
- ineffassign
- intrange
Expand Down
1 change: 1 addition & 0 deletions core/dnsserver/quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func AddPrefix(b []byte) (m []byte) {
}

// These methods implement the dns.ResponseWriter interface from Go DNS.

func (w *DoQWriter) TsigStatus() error { return nil }
func (w *DoQWriter) TsigTimersOnly(b bool) {}
func (w *DoQWriter) Hijack() {}
Expand Down
1 change: 1 addition & 0 deletions core/dnsserver/server_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (r *gRPCresponse) Write(b []byte) (int, error) {
}

// These methods implement the dns.ResponseWriter interface from Go DNS.

func (r *gRPCresponse) Close() error { return nil }
func (r *gRPCresponse) TsigStatus() error { return nil }
func (r *gRPCresponse) TsigTimersOnly(b bool) {}
Expand Down
2 changes: 1 addition & 1 deletion coremain/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ var (
gitShortStat string // git diff-index --shortstat
gitFilesModified string // git diff-index --name-only HEAD

// Gitcommit contains the commit where we built CoreDNS from.
// GitCommit contains the commit where we built CoreDNS from.
GitCommit string
)
1 change: 0 additions & 1 deletion plugin/auto/zone.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package auto implements a on-the-fly loading file backend.
package auto

import (
Expand Down
4 changes: 2 additions & 2 deletions plugin/kubernetes/object/multicluster_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
mcs "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1"
)

// Endpoints is a stripped down api.Endpoints with only the items we need for CoreDNS.
// MultiClusterEndpoints is a stripped down api.Endpoints with only the items we need for CoreDNS.
type MultiClusterEndpoints struct {
Endpoints
ClusterId string
Expand All @@ -18,7 +18,7 @@ type MultiClusterEndpoints struct {
// MultiClusterEndpointsKey returns a string using for the index.
func MultiClusterEndpointsKey(name, namespace string) string { return name + "." + namespace }

// EndpointSliceToEndpoints converts a *discovery.EndpointSlice to a *Endpoints.
// EndpointSliceToMultiClusterEndpoints converts a *discovery.EndpointSlice to a *Endpoints.
func EndpointSliceToMultiClusterEndpoints(obj meta.Object) (meta.Object, error) {
labels := maps.Clone(obj.GetLabels())
ends, err := EndpointSliceToEndpoints(obj)
Expand Down
4 changes: 2 additions & 2 deletions plugin/loadbalance/handler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package loadbalance is a plugin for rewriting responses to do "load balancing"
// Package loadbalance is a plugin for rewriting responses to do "load balancing".
package loadbalance

import (
Expand All @@ -9,7 +9,7 @@ import (
"github.com/miekg/dns"
)

// RoundRobin is a plugin to rewrite responses for "load balancing".
// LoadBalance is a plugin to rewrite responses for "load balancing".
type LoadBalance struct {
Next plugin.Handler
shuffle func(*dns.Msg) *dns.Msg
Expand Down
1 change: 0 additions & 1 deletion plugin/loadbalance/loadbalance.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package loadbalance shuffles A, AAAA and MX records.
package loadbalance

import (
Expand Down
1 change: 0 additions & 1 deletion plugin/rewrite/edns0.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package rewrite is a plugin for rewriting requests internally to something different.
package rewrite

import (
Expand Down
4 changes: 2 additions & 2 deletions plugin/rewrite/rewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const (

// These are defined processing mode.
const (
// Processing should stop after completing this rule
// Stop processing should stop after completing this rule
Stop = "stop"
// Processing should continue to next rule
// Continue processing should continue to next rule
Continue = "continue"
)

Expand Down
1 change: 0 additions & 1 deletion plugin/rewrite/type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Package rewrite is a plugin for rewriting requests internally to something different.
package rewrite

import (
Expand Down
2 changes: 0 additions & 2 deletions plugin/test/doc.go

This file was deleted.

3 changes: 2 additions & 1 deletion plugin/test/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package test will scrape a target and you can inspect the variables.
// Package test contains helper functions for writing plugin tests.
// For example to scrape a target and inspect the variables.
// Basic usage:
//
// result := Scrape("http://localhost:9153/metrics")
Expand Down
Loading