diff --git a/core/dns.go b/core/dns.go index d8011925..2067ea3a 100644 --- a/core/dns.go +++ b/core/dns.go @@ -52,7 +52,7 @@ func (d *DNS) query(url string, result *Result) { m.SetQuestion(d.QueryName, queryType) r, _, err := c.Exchange(m, url) if err != nil { - result.Errors = append(result.Errors, err.Error()) + result.AddError(err.Error()) return } result.Connected = true diff --git a/core/service.go b/core/service.go index 5545dc9d..067ea26c 100644 --- a/core/service.go +++ b/core/service.go @@ -195,7 +195,7 @@ func (service *Service) call(result *Result) { } else if isServiceStartTLS { result.Connected, certificate, err = client.CanPerformStartTLS(strings.TrimPrefix(service.URL, "starttls://"), service.Insecure) if err != nil { - result.Errors = append(result.Errors, err.Error()) + result.AddError(err.Error()) return } result.Duration = time.Since(startTime)