Commit a6d2d7b5 authored by Yong Tang's avatar Yong Tang Committed by GitHub

go lint cleanup (#904)

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 1ddafcbd
...@@ -48,7 +48,7 @@ import ( ...@@ -48,7 +48,7 @@ import (
// If AutoPathFunc returns a nil slice, no autopathing will be done. // If AutoPathFunc returns a nil slice, no autopathing will be done.
type AutoPathFunc func(request.Request) []string 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 { type AutoPath struct {
Next middleware.Handler Next middleware.Handler
Zones []string Zones []string
...@@ -58,6 +58,7 @@ type AutoPath struct { ...@@ -58,6 +58,7 @@ type AutoPath struct {
searchFunc AutoPathFunc searchFunc AutoPathFunc
} }
// ServeDNS implements the middleware.Handle interface.
func (a *AutoPath) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { func (a *AutoPath) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
state := request.Request{W: w, Req: r} state := request.Request{W: w, Req: r}
if state.QClass() != dns.ClassINET { if state.QClass() != dns.ClassINET {
...@@ -150,4 +151,5 @@ func (a *AutoPath) FirstInSearchPath(name string) bool { ...@@ -150,4 +151,5 @@ func (a *AutoPath) FirstInSearchPath(name string) bool {
return false return false
} }
// Name implements the Handler interface.
func (a *AutoPath) Name() string { return "autopath" } func (a *AutoPath) Name() string { return "autopath" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment