ioutil -> io

This commit is contained in:
Jan-Lukas Else 2022-02-18 16:40:10 +01:00
parent 6fc1e0dc03
commit 6889123995
2 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import (
"bufio"
"errors"
"io"
"io/ioutil"
"net"
"net/http"
"strings"
@ -98,7 +97,7 @@ func (c *Compressor) SetEncoder(encoding string, fn EncoderFunc) {
c.pooledEncoders[encoding] = &sync.Pool{
New: func() interface{} {
return fn(ioutil.Discard, c.level)
return fn(io.Discard, c.level)
},
}

View File

@ -2,7 +2,6 @@ package mocksmtp
import (
"io"
"io/ioutil"
"github.com/emersion/go-smtp"
)
@ -53,7 +52,7 @@ func (s *session) Rcpt(to string) error {
}
func (s *session) Data(r io.Reader) error {
if b, err := ioutil.ReadAll(r); err != nil {
if b, err := io.ReadAll(r); err != nil {
return err
} else {
s.values.Datas = append(s.values.Datas, b)