Commit 9c62ddaa authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

Small golint cleanup (#977)

* Small golint cleanup

Mostly docs in autopath.

* duh
parent 10b72210
/* /*
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... 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 The server has a copy (via AutoPathFunc) of the client's search path and on
...@@ -21,7 +21,7 @@ through the search path. ...@@ -21,7 +21,7 @@ through the search path.
It is assume the search path ordering is identical between server and client. It is assume the search path ordering is identical between server and client.
Midldeware implementing autopath, must have a function called `AutoPath` of type 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: I.e:
...@@ -43,10 +43,10 @@ import ( ...@@ -43,10 +43,10 @@ import (
"golang.org/x/net/context" "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. // 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. // If Func returns a nil slice, no autopathing will be done.
type AutoPathFunc func(request.Request) []string type Func 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 {
...@@ -55,7 +55,7 @@ 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 always includes "" as the last element, so we try the base query with out any search paths added as well.
search []string search []string
searchFunc AutoPathFunc searchFunc Func
} }
// ServeDNS implements the middleware.Handle interface. // ServeDNS implements the middleware.Handle interface.
......
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