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:
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user