more err log
parent
7a3236e02f
commit
0f85b99815
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
|
|
@ -139,7 +140,7 @@ func (s *Server) dig(ctx context.Context, host string) (string, error) {
|
||||||
}
|
}
|
||||||
ip, err := s.resolver.LookupHost(ctx, search)
|
ip, err := s.resolver.LookupHost(ctx, search)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", fmt.Errorf("failed to dns lookup %s: %v", search, err)
|
||||||
}
|
}
|
||||||
if len(ip) == 0 {
|
if len(ip) == 0 {
|
||||||
return "", errors.New("name does not resolve")
|
return "", errors.New("name does not resolve")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue