From 2d7f28e152a8d52fff77c1a23cbdbbd9cb75911a Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Wed, 24 Feb 2021 19:21:31 -0500 Subject: Update examples/client.go --- examples/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/client.go b/examples/client.go index 267af7c..6a4a848 100644 --- a/examples/client.go +++ b/examples/client.go @@ -153,11 +153,11 @@ func main() { fmt.Println(err) os.Exit(1) } - defer resp.Close() + defer resp.Body.Close() // Handle response if resp.Status.Class() == gemini.StatusSuccess { - _, err := io.Copy(os.Stdout, resp) + _, err := io.Copy(os.Stdout, resp.Body) if err != nil { log.Fatal(err) } -- cgit v1.2.3