aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-24 19:21:31 -0500
committerAdnan Maolood <[email protected]>2021-02-24 19:21:31 -0500
commit2d7f28e152a8d52fff77c1a23cbdbbd9cb75911a (patch)
tree04543fe7f4c8114cf62b224b399648dfd7fde2b1 /examples
parentRemove ResponseWriter.Close method (diff)
downloadgo-gemini-2d7f28e152a8d52fff77c1a23cbdbbd9cb75911a.tar.xz
go-gemini-2d7f28e152a8d52fff77c1a23cbdbbd9cb75911a.zip
Update examples/client.go
Diffstat (limited to 'examples')
-rw-r--r--examples/client.go4
1 files changed, 2 insertions, 2 deletions
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)
}