mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-05 17:37:03 +00:00
Replace uses of ioutil
ioutil package was deprecated in Go 1.16, replace all uses with their respective replacements. This patch was generated with a combination of `gofmt -r`, `eg`, and manually (for `ioutil.ReadDir`).
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math/rand"
|
||||
"net"
|
||||
"net/mail"
|
||||
@@ -637,7 +636,7 @@ func (c *Conn) DATA(params string) (code int, msg string) {
|
||||
// Create a dot reader, limited to the maximum size.
|
||||
dotr := textproto.NewReader(bufio.NewReader(
|
||||
io.LimitReader(c.reader, c.maxDataSize))).DotReader()
|
||||
c.data, err = ioutil.ReadAll(dotr)
|
||||
c.data, err = io.ReadAll(dotr)
|
||||
if err != nil {
|
||||
if err == io.ErrUnexpectedEOF {
|
||||
// Message is too big already. But we need to keep reading until we see
|
||||
|
||||
Reference in New Issue
Block a user