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) }