diff --git a/functions.go b/functions.go index f04a257..cd1557f 100644 --- a/functions.go +++ b/functions.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "strings" + "log" "github.com/labstack/echo/v4" "github.com/likexian/whois-go" @@ -23,12 +24,12 @@ func GetIPInfo(c echo.Context) (ip IP, err error) { err = ip.CheckIPAddress() if err != nil { - return IP{}, err + log.Println(fmt.Sprintf("Error checking IP address %s",ip.IP)) } err = ip.GetHostname() if err != nil { - return IP{}, err + log.Println(fmt.Sprintf("Error checking revers DNS for IP address %s",ip.IP)) } return @@ -39,6 +40,7 @@ func Dip(c echo.Context) (err error) { var ip IP ip, err = GetIPInfo(c) + fmt.Println(err) if err != nil { return c.Render(http.StatusInternalServerError, "error.html", nil) }