more err log
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user