diff options
-rw-r--r-- | file.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -30,7 +30,9 @@ func (f *File) Contents() (content string, err error) { defer checkClose(reader, &err) buf := new(bytes.Buffer) - buf.ReadFrom(reader) + if _, err := buf.ReadFrom(reader); err != nil { + return "", err + } return buf.String(), nil } |