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
01f6e8cb
Commit
01f6e8cb
authored
Aug 26, 2017
by
Yong Tang
Committed by
GitHub
Aug 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup in go vet and misspell (#996)
Signed-off-by:
Yong Tang
<
yong.tang.github@outlook.com
>
parent
1bb836b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
middleware/federation/federation.go
middleware/federation/federation.go
+1
-1
middleware/kubernetes/parse.go
middleware/kubernetes/parse.go
+1
-1
middleware/rewrite/edns0.go
middleware/rewrite/edns0.go
+3
-3
No files found.
middleware/federation/federation.go
View file @
01f6e8cb
...
@@ -118,7 +118,7 @@ func (f *Federation) Name() string { return "federation" }
...
@@ -118,7 +118,7 @@ func (f *Federation) Name() string { return "federation" }
// label is always the 2nd to last once the zone is chopped of. For instance
// label is always the 2nd to last once the zone is chopped of. For instance
// "nginx.mynamespace.myfederation.svc.example.com" has "myfederation" as the federation label.
// "nginx.mynamespace.myfederation.svc.example.com" has "myfederation" as the federation label.
// IsNameFederation returns a new qname with the federation label and the label itself or two
// IsNameFederation returns a new qname with the federation label and the label itself or two
// em
tp
y strings if there wasn't a hit.
// em
pt
y strings if there wasn't a hit.
func
(
f
*
Federation
)
isNameFederation
(
name
,
zone
string
)
(
string
,
string
)
{
func
(
f
*
Federation
)
isNameFederation
(
name
,
zone
string
)
(
string
,
string
)
{
base
,
_
:=
dnsutil
.
TrimZone
(
name
,
zone
)
base
,
_
:=
dnsutil
.
TrimZone
(
name
,
zone
)
...
...
middleware/kubernetes/parse.go
View file @
01f6e8cb
...
@@ -74,7 +74,7 @@ func parseRequest(state request.Request) (r recordRequest, err error) {
...
@@ -74,7 +74,7 @@ func parseRequest(state request.Request) (r recordRequest, err error) {
return
r
,
nil
return
r
,
nil
}
}
// Bec
ua
se of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol.
// Bec
au
se of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol.
// Anything else is a query that is too long to answer and can safely be delegated to return an nxdomain.
// Anything else is a query that is too long to answer and can safely be delegated to return an nxdomain.
switch
last
{
switch
last
{
...
...
middleware/rewrite/edns0.go
View file @
01f6e8cb
...
@@ -234,11 +234,11 @@ func (rule *edns0VariableRule) ruleData(w dns.ResponseWriter, r *dns.Msg) ([]byt
...
@@ -234,11 +234,11 @@ func (rule *edns0VariableRule) ruleData(w dns.ResponseWriter, r *dns.Msg) ([]byt
return
[]
byte
(
req
.
Proto
()),
nil
return
[]
byte
(
req
.
Proto
()),
nil
case
serverIP
:
case
serverIP
:
serverI
p
,
_
,
err
:=
net
.
SplitHostPort
(
w
.
LocalAddr
()
.
String
())
i
p
,
_
,
err
:=
net
.
SplitHostPort
(
w
.
LocalAddr
()
.
String
())
if
err
!=
nil
{
if
err
!=
nil
{
serverI
p
=
w
.
RemoteAddr
()
.
String
()
i
p
=
w
.
RemoteAddr
()
.
String
()
}
}
return
rule
.
ipToWire
(
rule
.
family
(
w
.
RemoteAddr
()),
serverI
p
)
return
rule
.
ipToWire
(
rule
.
family
(
w
.
RemoteAddr
()),
i
p
)
case
serverPort
:
case
serverPort
:
_
,
port
,
err
:=
net
.
SplitHostPort
(
w
.
LocalAddr
()
.
String
())
_
,
port
,
err
:=
net
.
SplitHostPort
(
w
.
LocalAddr
()
.
String
())
...
...
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