feat: RFC-8427 #171

Merged
sam merged 16 commits from RFC-8427 into master 2022-12-27 20:07:09 +00:00
Showing only changes of commit 9f517424d0 - Show all commits

View file

@ -3,7 +3,6 @@ package query
import (
"encoding/hex"
"fmt"
"strconv"
"strings"
"time"
@ -52,7 +51,7 @@ func (message *Message) displayAnswers(msg *dns.Msg, opts *util.Options, opt *dn
if opts.Display.HumanTTL {
ttl = (time.Duration(answer.Header().Ttl) * time.Second).String()
} else {
ttl = strconv.Itoa(int(answer.Header().Ttl))
ttl = answer.Header().Ttl
}
}
@ -95,7 +94,7 @@ func (message *Message) displayAuthority(msg *dns.Msg, opts *util.Options, opt *
if opts.Display.HumanTTL {
ttl = (time.Duration(ns.Header().Ttl) * time.Second).String()
} else {
ttl = strconv.Itoa(int(ns.Header().Ttl))
ttl = ns.Header().Ttl
}
}
@ -141,7 +140,7 @@ func (message *Message) displayAdditional(msg *dns.Msg, opts *util.Options, opt
if opts.Display.HumanTTL {
ttl = (time.Duration(additional.Header().Ttl) * time.Second).String()
} else {
ttl = strconv.Itoa(int(additional.Header().Ttl))
ttl = additional.Header().Ttl
}
}