mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-23 20:47:03 +00:00
chore: remove refs to deprecated io/ioutil (#376)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"container/list"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/mail"
|
||||
"time"
|
||||
|
||||
@@ -47,7 +46,7 @@ func (m *Message) Subject() string { return m.subject }
|
||||
|
||||
// Source returns a reader for the message source.
|
||||
func (m *Message) Source() (io.ReadCloser, error) {
|
||||
return ioutil.NopCloser(bytes.NewReader(m.source)), nil
|
||||
return io.NopCloser(bytes.NewReader(m.source)), nil
|
||||
}
|
||||
|
||||
// Size returns the message size in bytes.
|
||||
|
||||
@@ -2,7 +2,7 @@ package mem
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"sort"
|
||||
"strconv"
|
||||
"sync"
|
||||
@@ -62,7 +62,7 @@ func (s *Store) AddMessage(message storage.Message) (id string, err error) {
|
||||
err = ierr
|
||||
return
|
||||
}
|
||||
source, ierr := ioutil.ReadAll(r)
|
||||
source, ierr := io.ReadAll(r)
|
||||
if ierr != nil {
|
||||
err = ierr
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user