[#1684] *: Fix linter warnings

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-08-15 10:29:30 +03:00 committed by Pavel Karpy
parent 67af4c89a8
commit f8b106ac85
5 changed files with 9 additions and 11 deletions

View file

@ -2,7 +2,7 @@ package session
import (
"crypto/ecdsa"
"io/ioutil"
"os"
internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client"
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/common"
@ -28,7 +28,7 @@ func Prepare(cmd *cobra.Command, cnr cid.ID, obj *oid.ID, key *ecdsa.PrivateKey,
var tok session.Object
if tokenPath, _ := cmd.Flags().GetString(commonflags.SessionToken); len(tokenPath) != 0 {
data, err := ioutil.ReadFile(tokenPath)
data, err := os.ReadFile(tokenPath)
common.ExitOnErr(cmd, "can't read session token: %w", err)
if err := tok.Unmarshal(data); err != nil {