Skip to content

Commit

Permalink
fix lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
5amu committed Feb 8, 2024
1 parent 7bbd106 commit a36ff8a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/dnshunter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ func (opt *options) run() (err error) {
for _, check := range opt.checks {
wg.Add(1)
go func(ch checks.Check) {
ch.Init(c)
if err := ch.Start(opt.domain, nameservers); err != nil {
gologger.Error().Label("ERR").Msgf("check failed with error: %v", err)
err := ch.Init(c)
if err != nil {
gologger.Error().Label("ERR").Msgf("check init error: %v", err)
} else {
if err := ch.Start(opt.domain, nameservers); err != nil {
gologger.Error().Label("ERR").Msgf("check failed with error: %v", err)
}
}
resChan <- ch.Results()
wg.Done()
Expand Down

0 comments on commit a36ff8a

Please sign in to comment.