From c36dedccd1c7a508ffc1f07455e5a6a4aa33d460 Mon Sep 17 00:00:00 2001
From: Hans Kristian Hoel <hanskhoe@stud.ntnu.no>
Date: Tue, 5 Nov 2019 12:34:27 +0100
Subject: [PATCH] fixed crash

---
 assignment2/functions.go | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/assignment2/functions.go b/assignment2/functions.go
index 61d89a4..e5d04cf 100644
--- a/assignment2/functions.go
+++ b/assignment2/functions.go
@@ -31,9 +31,6 @@ func DoRequest(Client *http.Client, w http.ResponseWriter, API string) (*http.Re
 	}
 
 	resp, err := Client.Do(req)
-	if resp != nil {
-		defer resp.Body.Close()
-	}
 	if err != nil {
 		http.Error(w, err.Error(), http.StatusBadRequest)
 	}
-- 
GitLab