From d4caf6ffcab865141b300d1a8ff00437d86d7ce6 Mon Sep 17 00:00:00 2001 From: Julien Laffaye Date: Tue, 31 Mar 2020 16:49:19 +0200 Subject: [PATCH] Add close on read example Fixes #171 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c9df01e..8488deb 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ r, err := c.Retr("test-file.txt") if err != nil { panic(err) } +defer r.Close() buf, err := ioutil.ReadAll(r) println(string(buf))