diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/account/recover.go | 4 | ||||
-rw-r--r-- | commands/msg/forward.go | 3 | ||||
-rw-r--r-- | commands/msgview/open.go | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/commands/account/recover.go b/commands/account/recover.go index 7a1100e4..682a99c5 100644 --- a/commands/account/recover.go +++ b/commands/account/recover.go @@ -3,7 +3,7 @@ package account import ( "bytes" "errors" - "io/ioutil" + "io" "os" "path/filepath" @@ -89,7 +89,7 @@ func (Recover) Execute(aerc *widgets.Aerc, args []string) error { return nil, err } defer recoverFile.Close() - data, err := ioutil.ReadAll(recoverFile) + data, err := io.ReadAll(recoverFile) if err != nil { return nil, err } diff --git a/commands/msg/forward.go b/commands/msg/forward.go index d89667ae..040360ea 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math/rand" "os" "path" @@ -124,7 +123,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error { } if attachFull { - tmpDir, err := ioutil.TempDir("", "aerc-tmp-attachment") + tmpDir, err := os.MkdirTemp("", "aerc-tmp-attachment") if err != nil { return err } diff --git a/commands/msgview/open.go b/commands/msgview/open.go index 05a3c63c..f3723fbc 100644 --- a/commands/msgview/open.go +++ b/commands/msgview/open.go @@ -3,7 +3,6 @@ package msgview import ( "fmt" "io" - "io/ioutil" "mime" "os" "time" @@ -60,7 +59,7 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error { } } - tmpFile, err := ioutil.TempFile(os.TempDir(), "aerc-*"+extension) + tmpFile, err := os.CreateTemp(os.TempDir(), "aerc-*"+extension) if err != nil { aerc.PushError(err.Error()) return |