forked from TrueCloudLab/frostfs-node
[#638] Update to Go 1.16
Changes: * replace `iotuil` elements with the ones from `os` package; * replace `os.Filemode` with `fs.FileMode`; * use `signal.NotifyContext` instead of `NewGracefulContext` (removed). Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
61f48a2736
commit
56d4410913
30 changed files with 74 additions and 105 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
@ -195,7 +194,7 @@ func getKey() (*ecdsa.PrivateKey, error) {
|
|||
}
|
||||
|
||||
func getKeyFromFile(keyPath string) (*ecdsa.PrivateKey, error) {
|
||||
data, err := ioutil.ReadFile(keyPath)
|
||||
data, err := os.ReadFile(keyPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %v", errInvalidKey, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue