chore: remove refs to deprecated io/ioutil

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guoguangwu
2023-10-19 11:05:38 +08:00
parent 958b0671bd
commit 115e48a202
12 changed files with 56 additions and 59 deletions
+2 -2
View File
@@ -20,9 +20,9 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"sync"
"github.com/BBVA/kapow/internal/logger"
@@ -90,7 +90,7 @@ func Run(bindAddr string, wg *sync.WaitGroup, certFile, keyFile, cliCaFile strin
func loadCertificatesFromFile(certFile string) (pool *x509.CertPool, err error) {
if certFile != "" {
var caCerts []byte
caCerts, err = ioutil.ReadFile(certFile)
caCerts, err = os.ReadFile(certFile)
if err == nil {
pool = x509.NewCertPool()
if !pool.AppendCertsFromPEM(caCerts) {