From f1f933925cb3298e472cd4cb3f1f212c87d2de28 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Tue, 23 Feb 2021 17:52:34 -0500 Subject: [PATCH] Update examples/client.go --- examples/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/client.go b/examples/client.go index 6a4a848..267af7c 100644 --- a/examples/client.go +++ b/examples/client.go @@ -153,11 +153,11 @@ func main() { fmt.Println(err) os.Exit(1) } - defer resp.Body.Close() + defer resp.Close() // Handle response if resp.Status.Class() == gemini.StatusSuccess { - _, err := io.Copy(os.Stdout, resp.Body) + _, err := io.Copy(os.Stdout, resp) if err != nil { log.Fatal(err) }