diff options
author | 2017-08-24 08:56:48 +0100 | |
---|---|---|
committer | 2017-08-24 08:56:48 +0100 | |
commit | 9c62ddaa014b55a37e6737e925e16d6f6d07ac69 (patch) | |
tree | 3f34b7f9abddc8098f775789b74c2d1baa739273 /middleware | |
parent | 10b7221067b352b165c69c8cc9796586a1a9f3c2 (diff) | |
download | coredns-9c62ddaa014b55a37e6737e925e16d6f6d07ac69.tar.gz coredns-9c62ddaa014b55a37e6737e925e16d6f6d07ac69.tar.zst coredns-9c62ddaa014b55a37e6737e925e16d6f6d07ac69.zip |
Small golint cleanup (#977)
* Small golint cleanup
Mostly docs in autopath.
* duh
Diffstat (limited to 'middleware')
-rw-r--r-- | middleware/autopath/autopath.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/middleware/autopath/autopath.go b/middleware/autopath/autopath.go index 6779efa18..94db8bc56 100644 --- a/middleware/autopath/autopath.go +++ b/middleware/autopath/autopath.go @@ -1,5 +1,5 @@ /* -Autopath package implement autopathing. This is a hack; it shortcuts the +Package autopath implements autopathing. This is a hack; it shortcuts the client's search path resolution by performing these lookups on the server... The server has a copy (via AutoPathFunc) of the client's search path and on @@ -21,7 +21,7 @@ through the search path. It is assume the search path ordering is identical between server and client. Midldeware implementing autopath, must have a function called `AutoPath` of type -AutoPathFunc. Note the searchpath must be ending with the empty string. +autopath.Func. Note the searchpath must be ending with the empty string. I.e: @@ -43,10 +43,10 @@ import ( "golang.org/x/net/context" ) -// AutoPathFunc defines the function middleware should implement to return a search +// Func defines the function middleware should implement to return a search // path to the autopath middleware. The last element of the slice must be the empty string. -// If AutoPathFunc returns a nil slice, no autopathing will be done. -type AutoPathFunc func(request.Request) []string +// If Func returns a nil slice, no autopathing will be done. +type Func func(request.Request) []string // AutoPath perform autopath: service side search path completion. type AutoPath struct { @@ -55,7 +55,7 @@ type AutoPath struct { // Search always includes "" as the last element, so we try the base query with out any search paths added as well. search []string - searchFunc AutoPathFunc + searchFunc Func } // ServeDNS implements the middleware.Handle interface. |