Skip to content

Commit

Permalink
fix: exclude types from automatic qname selection
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jul 1, 2023
1 parent 7e7b95c commit 761dbb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,13 @@ All long form (--) flags can be toggled with the dig-standard +[no]flag notation
}

// Add non-flag RR types
rrType, ok := dns.StringToType[strings.ToUpper(arg)]
if ok {
rrType, typeFound := dns.StringToType[strings.ToUpper(arg)]
if typeFound {
rrTypes[rrType] = true
}

// Set qname if not set by flag
if opts.Name == "" && !containsAny(arg, []string{"@", "/", ".exe", "-", "+"}) {
if opts.Name == "" && !containsAny(arg, []string{"@", "/", ".exe", "-", "+"}) && !typeFound {
opts.Name = arg
}
}
Expand Down

0 comments on commit 761dbb5

Please sign in to comment.