slightly better formatting of the flags in msg.String()

This commit is contained in:
Miek Gieben 2011-01-18 19:19:42 +01:00
parent 514381d98d
commit e544237d36
1 changed files with 9 additions and 9 deletions

18
msg.go
View File

@ -698,30 +698,30 @@ func (h *MsgHdr) String() string {
s += ", status: " + rcode_str[h.Rcode]
s += ", id: " + strconv.Itoa(int(h.Id)) + "\n"
s += ";; flags: "
s += ";; flags:"
if h.Response {
s += "qr "
s += " qr"
}
if h.Authoritative {
s += "aa "
s += " aa"
}
if h.Truncated {
s += "tc "
s += " tc"
}
if h.RecursionDesired {
s += "rd "
s += " rd"
}
if h.RecursionAvailable {
s += "ra "
s += " ra"
}
if h.Zero { // Hmm
s += "z "
s += " z"
}
if h.AuthenticatedData {
s += "ad "
s += " ad"
}
if h.CheckingDisabled {
s += "cd "
s += " cd"
}
s += ";"