mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-20 02:57:05 +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,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
smtpclient "net/smtp"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -266,7 +266,7 @@ func readTestData(path ...string) []byte {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
data, err := ioutil.ReadAll(f)
|
||||
data, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/mail"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -159,7 +159,7 @@ func testContent(t *testing.T, store storage.Store, extHost *extension.Host) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := ioutil.ReadAll(r)
|
||||
got, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -455,7 +455,7 @@ func DeliverToStore(
|
||||
meta.To[0].Address, meta.From.Address, subject)
|
||||
delivery := &message.Delivery{
|
||||
Meta: meta,
|
||||
Reader: ioutil.NopCloser(strings.NewReader(testMsg)),
|
||||
Reader: io.NopCloser(strings.NewReader(testMsg)),
|
||||
}
|
||||
id, err := store.AddMessage(delivery)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user