Skip to content

Commit

Permalink
refactor: log unknown integer RR types as TYPE%d
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Aug 25, 2024
1 parent 88eed1e commit 3ae0d45
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,11 @@ All long form (--) flags can be toggled with the dig-standard +[no]flag notation
log.Debugf("Name: %s", opts.Name)
var rrTypeStrings []string
for rrType := range rrTypes {
rrTypeStrings = append(rrTypeStrings, dns.TypeToString[rrType])
rrS, ok := dns.TypeToString[rrType]
if !ok {
rrS = fmt.Sprintf("TYPE%d", rrType)
}
rrTypeStrings = append(rrTypeStrings, rrS)
}
log.Debugf("RR types: %+v", rrTypeStrings)
}
Expand Down

0 comments on commit 3ae0d45

Please sign in to comment.