summaryrefslogtreecommitdiff
path: root/modules/caddypki
diff options
context:
space:
mode:
authorKallyDev <36319157+kallydev@users.noreply.github.com>2021-09-30 01:17:48 +0800
committerGitHub <noreply@github.com>2021-09-29 11:17:48 -0600
commitc48fadc4a7655008d13076c7f757c36368e2ca13 (patch)
tree3fe2837e02e9b664dd5b86afbe42494ac20997f8 /modules/caddypki
parent059fc32f002d00e980b438b3edbdf7b8bcdf9a90 (diff)
Move from deprecated ioutil to os and io packages (#4364)
Diffstat (limited to 'modules/caddypki')
-rw-r--r--modules/caddypki/crypto.go6
1 files changed, 3 insertions, 3 deletions
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
}