Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Feb 1, 2023
1 parent e3567d3 commit db6bdac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/shared/fqdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ func FQDN() (string, error) {

cname, err := net.LookupCNAME(hostname)
if err != nil {
errs = fmt.Errorf("%s: %w", errs, err)
errs = fmt.Errorf("%s: failed looking up CNAME: %w", errs, err)
}
if cname != "" {
return cname, nil
}

ips, err := net.LookupIP(hostname)
if err != nil {
errs = fmt.Errorf("%s: %w", errs, err)
errs = fmt.Errorf("%s: failed looking up IP: %w", errs, err)
}

for _, ip := range ips {
Expand Down

0 comments on commit db6bdac

Please sign in to comment.