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
34f17b27
Commit
34f17b27
authored
Feb 21, 2019
by
Miek Gieben
Committed by
GitHub
Feb 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo: rrflags -> rflags (#2587)
Signed-off-by:
Miek Gieben
<
miek@miek.nl
>
parent
8691edd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
plugin/pkg/replacer/replacer.go
plugin/pkg/replacer/replacer.go
+2
-2
plugin/pkg/replacer/replacer_test.go
plugin/pkg/replacer/replacer_test.go
+1
-1
No files found.
plugin/pkg/replacer/replacer.go
View file @
34f17b27
...
@@ -38,7 +38,7 @@ var labels = []string{
...
@@ -38,7 +38,7 @@ var labels = []string{
"{rcode}"
,
"{rcode}"
,
"{rsize}"
,
"{rsize}"
,
"{duration}"
,
"{duration}"
,
headerReplacer
+
"r
r
flags}"
,
headerReplacer
+
"rflags}"
,
}
}
// value returns the current value of label.
// value returns the current value of label.
...
@@ -89,7 +89,7 @@ func value(state request.Request, rr *dnstest.Recorder, label string) string {
...
@@ -89,7 +89,7 @@ func value(state request.Request, rr *dnstest.Recorder, label string) string {
return
EmptyValue
return
EmptyValue
}
}
return
strconv
.
FormatFloat
(
time
.
Since
(
rr
.
Start
)
.
Seconds
(),
'f'
,
-
1
,
64
)
+
"s"
return
strconv
.
FormatFloat
(
time
.
Since
(
rr
.
Start
)
.
Seconds
(),
'f'
,
-
1
,
64
)
+
"s"
case
headerReplacer
+
"r
r
flags}"
:
case
headerReplacer
+
"rflags}"
:
if
rr
!=
nil
&&
rr
.
Msg
!=
nil
{
if
rr
!=
nil
&&
rr
.
Msg
!=
nil
{
return
flagsToString
(
rr
.
Msg
.
MsgHdr
)
return
flagsToString
(
rr
.
Msg
.
MsgHdr
)
}
}
...
...
plugin/pkg/replacer/replacer_test.go
View file @
34f17b27
...
@@ -62,7 +62,7 @@ func TestLabels(t *testing.T) {
...
@@ -62,7 +62,7 @@ func TestLabels(t *testing.T) {
"{rcode}"
:
"NOERROR"
,
"{rcode}"
:
"NOERROR"
,
"{rsize}"
:
"29"
,
"{rsize}"
:
"29"
,
"{duration}"
:
"0"
,
"{duration}"
:
"0"
,
headerReplacer
+
"r
rflags}"
:
"rd,ad,cd"
,
headerReplacer
+
"r
flags}"
:
"rd,ad,cd"
,
}
}
if
len
(
expect
)
!=
len
(
labels
)
{
if
len
(
expect
)
!=
len
(
labels
)
{
t
.
Fatalf
(
"Expect %d labels, got %d"
,
len
(
expect
),
len
(
labels
))
t
.
Fatalf
(
"Expect %d labels, got %d"
,
len
(
expect
),
len
(
labels
))
...
...
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