diff options
| author | Adnan Maolood <[email protected]> | 2020-11-08 18:38:08 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2020-11-08 18:38:08 -0500 |
| commit | 5332dc628043a5c0d18652ebf4b89576de7af653 (patch) | |
| tree | 5ad63d218219c2e5979850a44d00de92f9297d61 /examples | |
| parent | Fix relative redirects (diff) | |
| download | go-gemini-5332dc628043a5c0d18652ebf4b89576de7af653.tar.xz go-gemini-5332dc628043a5c0d18652ebf4b89576de7af653.zip | |
Don't guarantee that (*Response).Body is always non-nil
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/client.go b/examples/client.go index 9f5efae..012e6df 100644 --- a/examples/client.go +++ b/examples/client.go @@ -80,9 +80,9 @@ func main() { fmt.Println(err) os.Exit(1) } - defer resp.Body.Close() if resp.Status.Class() == gemini.StatusClassSuccess { + defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) |