aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/notmuch/message.go')
-rw-r--r--worker/notmuch/message.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/worker/notmuch/message.go b/worker/notmuch/message.go
index c95c9bac..e39fb17a 100644
--- a/worker/notmuch/message.go
+++ b/worker/notmuch/message.go
@@ -4,7 +4,6 @@
package notmuch
import (
- "bufio"
"fmt"
"io"
"os"
@@ -23,16 +22,12 @@ type Message struct {
}
// NewReader returns a reader for a message
-func (m *Message) NewReader() (io.Reader, error) {
+func (m *Message) NewReader() (io.ReadCloser, error) {
name, err := m.Filename()
if err != nil {
return nil, err
}
- f, err := os.Open(name)
- if err != nil {
- return nil, err
- }
- return bufio.NewReader(f), nil
+ return os.Open(name)
}
// MessageInfo populates a models.MessageInfo struct for the message.