mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
lint: enable nolintlint linter (#7332)
This commit is contained in:
@@ -7,6 +7,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- intrange
|
- intrange
|
||||||
|
- nolintlint
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
- unused
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ var (
|
|||||||
|
|
||||||
// Build information obtained with the help of -ldflags
|
// Build information obtained with the help of -ldflags
|
||||||
var (
|
var (
|
||||||
// nolint
|
|
||||||
appVersion = "(untracked dev build)" // inferred at startup
|
appVersion = "(untracked dev build)" // inferred at startup
|
||||||
devBuild = true // inferred at startup
|
devBuild = true // inferred at startup
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ func (f HandlerFunc) Name() string { return "handlerfunc" }
|
|||||||
func Error(name string, err error) error { return fmt.Errorf("%s/%s: %s", "plugin", name, err) }
|
func Error(name string, err error) error { return fmt.Errorf("%s/%s: %s", "plugin", name, err) }
|
||||||
|
|
||||||
// NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a `no next plugin found` error.
|
// NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a `no next plugin found` error.
|
||||||
func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { // nolint: golint
|
func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||||
if next != nil {
|
if next != nil {
|
||||||
if span := ot.SpanFromContext(ctx); span != nil {
|
if span := ot.SpanFromContext(ctx); span != nil {
|
||||||
child := span.Tracer().StartSpan(next.Name(), ot.ChildOf(span.Context()))
|
child := span.Tracer().StartSpan(next.Name(), ot.ChildOf(span.Context()))
|
||||||
|
|||||||
Reference in New Issue
Block a user