From c48fadc4a7655008d13076c7f757c36368e2ca13 Mon Sep 17 00:00:00 2001 From: KallyDev <36319157+kallydev@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:17:48 +0800 Subject: Move from deprecated ioutil to os and io packages (#4364) --- modules/caddypki/crypto.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/caddypki') diff --git a/modules/caddypki/crypto.go b/modules/caddypki/crypto.go index e1a0e35..d8e72c6 100644 --- a/modules/caddypki/crypto.go +++ b/modules/caddypki/crypto.go @@ -23,7 +23,7 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "io/ioutil" + "os" "strings" ) @@ -137,11 +137,11 @@ type KeyPair struct { func (kp KeyPair) Load() (*x509.Certificate, interface{}, error) { switch kp.Format { case "", "pem_file": - certData, err := ioutil.ReadFile(kp.Certificate) + certData, err := os.ReadFile(kp.Certificate) if err != nil { return nil, nil, err } - keyData, err := ioutil.ReadFile(kp.PrivateKey) + keyData, err := os.ReadFile(kp.PrivateKey) if err != nil { return nil, nil, err } -- cgit v1.2.3