Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
9c62ddaa
Commit
9c62ddaa
authored
Aug 24, 2017
by
Miek Gieben
Committed by
GitHub
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small golint cleanup (#977)
* Small golint cleanup Mostly docs in autopath. * duh
parent
10b72210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
middleware/autopath/autopath.go
middleware/autopath/autopath.go
+6
-6
No files found.
middleware/autopath/autopath.go
View file @
9c62ddaa
/*
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
AutoPath
Func. 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"
)
//
AutoPath
Func 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
AutoPath
Func returns a nil slice, no autopathing will be done.
type
AutoPath
Func
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
AutoPath
Func
searchFunc
Func
}
// ServeDNS implements the middleware.Handle interface.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment