geoip

short golang utility to fetch geoip data from an API
git clone https://git.parazyd.org/geoip
Log | Files | Refs | LICENSE

commit 75066b543e1dce396f7e9ba75daac70b3b5e2674
parent b5a354b3003d7f6a2d81b0441d8d476fb6393ffa
Author: parazyd <parazyd@dyne.org>
Date:   Fri,  2 Aug 2019 11:45:13 +0200

Do an error check on the final encode.

Diffstat:
Mgeoip.go | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/geoip.go b/geoip.go @@ -53,5 +53,7 @@ func main() { } enc := json.NewEncoder(os.Stdout) - enc.Encode(data) + if err := enc.Encode(data); err != nil { + log.Fatal(err) + } }