From df322b529119e8236f583d632fff1bea982e3157 Mon Sep 17 00:00:00 2001 From: Joel Schmid Date: Fri, 19 Mar 2021 23:48:26 +0100 Subject: [PATCH] close weather api --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index df53e9c..27f2a85 100644 --- a/main.go +++ b/main.go @@ -44,11 +44,11 @@ func main() { //setup a API -> REST var weatherAPI api.WeatherAPI weatherAPI = api.NewRestAPI(":10000", weatherStorage) + defer weatherAPI.Close() err = weatherAPI.Start() if err != nil { os.Exit(1) } - defer weatherAPI.Close() }