From 2eea052ce4b2c2a035830c45d902c5d2a50d902a Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 4 Jul 2023 18:17:46 -0700 Subject: [PATCH] Add missing error check --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }