mirror of
https://github.com/fatedier/frp.git
synced 2025-07-29 01:07:38 +00:00
refactor: move from io/ioutil to io and os package (#2592)
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
"os"
|
||||
)
|
||||
|
||||
func newCustomTLSKeyPair(certfile, keyfile string) (*tls.Certificate, error) {
|
||||
@@ -47,7 +47,7 @@ func newRandomTLSKeyPair() *tls.Certificate {
|
||||
func newCertPool(caPath string) (*x509.CertPool, error) {
|
||||
pool := x509.NewCertPool()
|
||||
|
||||
caCrt, err := ioutil.ReadFile(caPath)
|
||||
caCrt, err := os.ReadFile(caPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user