Add close on read example

Fixes #171
This commit is contained in:
Julien Laffaye 2020-03-31 16:49:19 +02:00
parent 041eae9a3d
commit d4caf6ffca

View File

@ -50,6 +50,7 @@ r, err := c.Retr("test-file.txt")
if err != nil { if err != nil {
panic(err) panic(err)
} }
defer r.Close()
buf, err := ioutil.ReadAll(r) buf, err := ioutil.ReadAll(r)
println(string(buf)) println(string(buf))