diff options
Diffstat (limited to 'worker/mbox')
-rw-r--r-- | worker/mbox/io.go | 3 | ||||
-rw-r--r-- | worker/mbox/models.go | 5 | ||||
-rw-r--r-- | worker/mbox/worker.go | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/worker/mbox/io.go b/worker/mbox/io.go index 67290482..31a906cc 100644 --- a/worker/mbox/io.go +++ b/worker/mbox/io.go @@ -3,7 +3,6 @@ package mboxer import ( "errors" "io" - "io/ioutil" "time" "git.sr.ht/~rjarry/aerc/models" @@ -23,7 +22,7 @@ func Read(r io.Reader) ([]lib.RawMessage, error) { return nil, err } - content, err := ioutil.ReadAll(msg) + content, err := io.ReadAll(msg) if err != nil { return nil, err } diff --git a/worker/mbox/models.go b/worker/mbox/models.go index 849133c1..eec73379 100644 --- a/worker/mbox/models.go +++ b/worker/mbox/models.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "git.sr.ht/~rjarry/aerc/models" "git.sr.ht/~rjarry/aerc/worker/lib" @@ -150,7 +149,7 @@ func (f *container) newUid() (next uint32) { } func (f *container) Append(r io.Reader, flags []models.Flag) error { - data, err := ioutil.ReadAll(r) + data, err := io.ReadAll(r) if err != nil { return err } @@ -170,7 +169,7 @@ type message struct { } func (m *message) NewReader() (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewReader(m.content)), nil + return io.NopCloser(bytes.NewReader(m.content)), nil } func (m *message) ModelFlags() ([]models.Flag, error) { diff --git a/worker/mbox/worker.go b/worker/mbox/worker.go index 1e3ab982..78a9b1b6 100644 --- a/worker/mbox/worker.go +++ b/worker/mbox/worker.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" + "io" "net/url" "os" "path/filepath" @@ -224,7 +224,7 @@ func (w *mboxWorker) handleMessage(msg types.WorkerMessage) error { continue } defer r.Close() - b, err := ioutil.ReadAll(r) + b, err := io.ReadAll(r) if err != nil { logging.Errorf("could not get message reader: %w", err) continue |