mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
Replace deprecated ioutil
As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code.
This commit is contained in:
committed by
Nick Craig-Wood
parent
776e5ea83a
commit
5d6b8141ec
@@ -7,10 +7,10 @@ import (
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -187,7 +187,7 @@ func NewServer(listeners, tlsListeners []net.Listener, opt Options) (Server, err
|
||||
return nil, err
|
||||
}
|
||||
certpool := x509.NewCertPool()
|
||||
pem, err := ioutil.ReadFile(opt.ClientCA)
|
||||
pem, err := os.ReadFile(opt.ClientCA)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to read client certificate authority: %v", err)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user