Skip to content

Commit

Permalink
Improvement based on golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lietu committed Nov 22, 2019
1 parent b059f5f commit 3f329eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shared/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ func ReportSuccess(req *dns.Msg, res *dns.Msg, rtt time.Duration, server string)

// TODO: Track per-server stats

var ttl time.Duration = 0
q := req.Question[0]
t := dns.TypeToString[q.Qtype]
name := q.Name
Expand Down Expand Up @@ -105,7 +104,7 @@ func ReportSuccess(req *dns.Msg, res *dns.Msg, rtt time.Duration, server string)

extra := ""
ans := answerList[0]
ttl = time.Second * time.Duration(ans.Header().Ttl)
ttl := time.Second * time.Duration(ans.Header().Ttl)
extra = fmt.Sprintf(" (+%d more)", answers-1)
result := answerResult(ans)

Expand Down

0 comments on commit 3f329eb

Please sign in to comment.