diff --git a/main.go b/main.go index c9c883d..a4b7534 100644 --- a/main.go +++ b/main.go @@ -97,7 +97,9 @@ func queryAddress() (string, error) { } var ip response - json.Unmarshal(body, &ip) + if err := json.Unmarshal(body, &ip); err != nil { + return "", err + } return ip.Query, nil }