Fix typo: rrflags -> rflags (#2587)

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2019-02-21 07:13:05 +00:00
committed by GitHub
parent 8691edd69d
commit 34f17b276a
2 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ var labels = []string{
"{rcode}", "{rcode}",
"{rsize}", "{rsize}",
"{duration}", "{duration}",
headerReplacer + "rrflags}", 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 {
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 + "rrflags}": 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)
} }

View File

@@ -62,7 +62,7 @@ func TestLabels(t *testing.T) {
"{rcode}": "NOERROR", "{rcode}": "NOERROR",
"{rsize}": "29", "{rsize}": "29",
"{duration}": "0", "{duration}": "0",
headerReplacer + "rrflags}": "rd,ad,cd", headerReplacer + "rflags}": "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))