make ttl an int if it is an int
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
8aad12c7ef
commit
9f517424d0
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue