aboutsummaryrefslogtreecommitdiffstats
path: root/worker/mbox/models.go
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-08-17 16:19:45 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-22 09:30:19 +0200
commit9cffc45f0347e5c8b801c151955fa9326b9b2ba7 (patch)
tree4de8e74f1ec7378297185f65807cb9019caf1a1a /worker/mbox/models.go
parent1b91b68e7385239783bee818974c4ce2032b7039 (diff)
downloadaerc-9cffc45f0347e5c8b801c151955fa9326b9b2ba7.tar.gz
go: removed io/ioutil
Since the minimum required version of Go has been bumped to 1.16, the deprecation of io/ioutil can now be acted upon. This Commit removes the remaining dependencies on ioutil and replaces them with their io or os counterparts. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/mbox/models.go')
-rw-r--r--worker/mbox/models.go5
1 files changed, 2 insertions, 3 deletions
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) {