From d60fb7914bac2decd8acef27f8fc878c80e4453e Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 20 Apr 2021 23:48:32 +0300 Subject: [PATCH] fixup Signed-off-by: Vasiliy Tolstov --- toml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml.go b/toml.go index 02e8c0f..cfb0fe0 100644 --- a/toml.go +++ b/toml.go @@ -56,7 +56,7 @@ func (c *tomlCodec) ReadBody(conn io.Reader, b interface{}) error { buf, err := ioutil.ReadAll(conn) if err != nil { return err - } else if len(buf) { + } else if len(buf) == 0 { return nil } m.Data = buf