forked from TrueCloudLab/frostfs-node
[#1250] *: Remove io/ioutil imports
It is deprecated starting from go1.16. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
3bdab77c42
commit
622ea4818f
9 changed files with 28 additions and 32 deletions
|
@ -3,7 +3,7 @@ package cmd
|
|||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
@ -39,7 +39,7 @@ func Test_getKey(t *testing.T) {
|
|||
keyPath := filepath.Join(dir, "binary.key")
|
||||
rawKey, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, ioutil.WriteFile(keyPath, rawKey.Bytes(), os.ModePerm))
|
||||
require.NoError(t, os.WriteFile(keyPath, rawKey.Bytes(), os.ModePerm))
|
||||
|
||||
wifKey, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
@ -52,7 +52,7 @@ func Test_getKey(t *testing.T) {
|
|||
in := bytes.NewBuffer(nil)
|
||||
input.Terminal = term.NewTerminal(input.ReadWriter{
|
||||
Reader: in,
|
||||
Writer: ioutil.Discard,
|
||||
Writer: io.Discard,
|
||||
}, "")
|
||||
|
||||
checkKeyError(t, filepath.Join(dir, "badfile"), errInvalidKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue