migrate away from deprecated ioutil APIs (#7175)

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
Sharad Chand
2021-10-28 10:34:07 -07:00
committed by GitHub
co-authored by Callum Waters M. J. Fromberger
parent 6108d0a9b5
commit 8441b3715a
58 changed files with 158 additions and 192 deletions
+2 -3
View File
@@ -4,7 +4,6 @@ import (
"context"
"crypto/tls"
"crypto/x509"
"io/ioutil"
"os"
"time"
@@ -14,7 +13,7 @@ import (
"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
grpc "google.golang.org/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/keepalive"
)
@@ -65,7 +64,7 @@ func GenerateTLS(certPath, keyPath, ca string, log log.Logger) grpc.DialOption {
}
certPool := x509.NewCertPool()
bs, err := ioutil.ReadFile(ca)
bs, err := os.ReadFile(ca)
if err != nil {
log.Error("failed to read ca cert:", "error", err)
os.Exit(1)