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
a6d2d7b5
Commit
a6d2d7b5
authored
Aug 11, 2017
by
Yong Tang
Committed by
GitHub
Aug 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go lint cleanup (#904)
Signed-off-by:
Yong Tang
<
yong.tang.github@outlook.com
>
parent
1ddafcbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
middleware/autopath/autopath.go
middleware/autopath/autopath.go
+3
-1
No files found.
middleware/autopath/autopath.go
View file @
a6d2d7b5
...
@@ -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
// Auto
p
ath perform autopath: service side search path completion.
// Auto
P
ath 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"
}
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