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

View File

@ -2,7 +2,6 @@ package mocksmtp
import ( import (
"io" "io"
"io/ioutil"
"github.com/emersion/go-smtp" "github.com/emersion/go-smtp"
) )
@ -53,7 +52,7 @@ func (s *session) Rcpt(to string) error {
} }
func (s *session) Data(r io.Reader) 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 return err
} else { } else {
s.values.Datas = append(s.values.Datas, b) s.values.Datas = append(s.values.Datas, b)