Skip to content

Commit

Permalink
fix: fallback qname selection
Browse files Browse the repository at this point in the history
Closes: #51
  • Loading branch information
natesales committed Jul 1, 2023
1 parent 7c473bb commit f9c4ab6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ All long form (--) flags can be toggled with the dig-standard +[no]flag notation
}

// Set qname if not set by flag
if opts.Name == "" && (strings.Contains(arg, ".") || strings.Contains(arg, ":")) && !containsAny(arg, []string{"@", "/", ".exe", "-", "+"}) {
if opts.Name == "" && !containsAny(arg, []string{"@", "/", ".exe", "-", "+"}) {
opts.Name = arg
}
}
Expand Down Expand Up @@ -450,6 +450,7 @@ All long form (--) flags can be toggled with the dig-standard +[no]flag notation

// Log RR types
if opts.Verbose {
log.Debugf("Name: %s", opts.Name)
var rrTypeStrings []string
for rrType := range rrTypes {
rrTypeStrings = append(rrTypeStrings, dns.TypeToString[rrType])
Expand Down

0 comments on commit f9c4ab6

Please sign in to comment.