diff options
| author | Adnan Maolood <[email protected]> | 2021-02-23 17:52:34 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-23 17:52:34 -0500 |
| commit | f1f933925cb3298e472cd4cb3f1f212c87d2de28 (patch) | |
| tree | a0b60a64410448817ad79d8fbfb350c815bbabd3 /examples | |
| parent | Make Response an io.ReadCloser (diff) | |
| download | go-gemini-f1f933925cb3298e472cd4cb3f1f212c87d2de28.tar.xz go-gemini-f1f933925cb3298e472cd4cb3f1f212c87d2de28.zip | |
Update examples/client.go
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/client.go | 4 |
1 files 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) } |