mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-14 13:57:09 +00:00
ioutil -> io
This commit is contained in:
parent
6fc1e0dc03
commit
6889123995
|
@ -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)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user