aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2017-08-11 19:48:11 -0700
committerGravatar GitHub <noreply@github.com> 2017-08-11 19:48:11 -0700
commita6d2d7b5f76f06a6ffe56f3d96b24add133ff8e1 (patch)
treebacee46cabf6f885999f87a8eae5eee0cb97bc24
parent1ddafcbdfff8ef107654935993147a3edf933c25 (diff)
downloadcoredns-a6d2d7b5f76f06a6ffe56f3d96b24add133ff8e1.tar.gz
coredns-a6d2d7b5f76f06a6ffe56f3d96b24add133ff8e1.tar.zst
coredns-a6d2d7b5f76f06a6ffe56f3d96b24add133ff8e1.zip
go lint cleanup (#904)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
-rw-r--r--middleware/autopath/autopath.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/middleware/autopath/autopath.go b/middleware/autopath/autopath.go
index d859e5642..2c581eadd 100644
--- a/middleware/autopath/autopath.go
+++ b/middleware/autopath/autopath.go
@@ -48,7 +48,7 @@ import (
// If AutoPathFunc returns a nil slice, no autopathing will be done.
type AutoPathFunc func(request.Request) []string
-// Autopath perform autopath: service side search path completion.
+// AutoPath perform autopath: service side search path completion.
type AutoPath struct {
Next middleware.Handler
Zones []string
@@ -58,6 +58,7 @@ type AutoPath struct {
searchFunc AutoPathFunc
}
+// ServeDNS implements the middleware.Handle interface.
func (a *AutoPath) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
state := request.Request{W: w, Req: r}
if state.QClass() != dns.ClassINET {
@@ -150,4 +151,5 @@ func (a *AutoPath) FirstInSearchPath(name string) bool {
return false
}
+// Name implements the Handler interface.
func (a *AutoPath) Name() string { return "autopath" }