1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-11-23 00:11:57 +01:00

Update examples/client.go

This commit is contained in:
adnano 2021-02-24 19:21:31 -05:00
parent 3255b024e9
commit 13d4ba5708

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