aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorOleksandr Redko <[email protected]>2023-07-28 11:23:20 +0300
committerGitHub <[email protected]>2023-07-28 10:23:20 +0200
commit2589b1295cce53f7bb83cfe2074b0b272eb57217 (patch)
tree1acffe7aa3e129eb714cbdf158e745b0bc86d557 /commands
parentef6e813ca8e185bfb9c629e76380647394cd296f (diff)
downloadhugo-2589b1295cce53f7bb83cfe2074b0b272eb57217.tar.gz
hugo-2589b1295cce53f7bb83cfe2074b0b272eb57217.zip
commands: Replace deprecated ioutil with os
Diffstat (limited to 'commands')
-rw-r--r--commands/server.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/server.go b/commands/server.go
index bf82b748d..153f4a9d1 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -23,7 +23,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/url"
@@ -686,9 +685,9 @@ func (c *serverCommand) createCertificates(conf *commonConfig) error {
c.tlsKeyFile = filepath.Join(keyDir, fmt.Sprintf("%s-key.pem", hostname))
// Check if the certificate already exists and is valid.
- certPEM, err := ioutil.ReadFile(c.tlsCertFile)
+ certPEM, err := os.ReadFile(c.tlsCertFile)
if err == nil {
- rootPem, err := ioutil.ReadFile(filepath.Join(mclib.GetCAROOT(), "rootCA.pem"))
+ rootPem, err := os.ReadFile(filepath.Join(mclib.GetCAROOT(), "rootCA.pem"))
if err == nil {
if err := c.verifyCert(rootPem, certPEM, hostname); err == nil {
c.r.Println("Using existing", c.tlsCertFile, "and", c.tlsKeyFile)