From e4187924b21352f5b42ca1f9614599748370a5a3 Mon Sep 17 00:00:00 2001 From: Aiden Fox Ivey Date: Wed, 6 Mar 2024 11:40:23 -0500 Subject: [PATCH] close http.Get call (#255) * Remove superfluous cast * Close resp and handle error Signed-off-by: Aiden Fox Ivey * Update samples/embedded_file/main.go Co-authored-by: Thomas Tendyck <51411342+thomasten@users.noreply.github.com> --------- Signed-off-by: Aiden Fox Ivey Co-authored-by: Thomas Tendyck <51411342+thomasten@users.noreply.github.com> --- samples/embedded_file/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/embedded_file/main.go b/samples/embedded_file/main.go index ddbb31f2..25a7baf2 100644 --- a/samples/embedded_file/main.go +++ b/samples/embedded_file/main.go @@ -12,4 +12,7 @@ func main() { panic(err) } fmt.Println(resp.Status) + if err := resp.Body.Close(); err != nil { + panic(err) + } }