summaryrefslogtreecommitdiff
path: root/client/httpclient.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2021-09-08 08:52:53 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2021-09-08 08:52:53 +0000
commit07bbfd279bc236229d95942372370b955db08b75 (patch)
tree41f0f8217f5355ba86aae8b352633fbb80e21a1a /client/httpclient.go
parent81e580997d07a7a9d3dddbd42cbb39f305c63b8b (diff)
parent087c010c476ed6c009b6c94a76a7e9db3b9d3fdd (diff)
downloadgitlab-shell-07bbfd279bc236229d95942372370b955db08b75.tar.gz
Merge branch 'remove/ioutil' into 'main'
refactor: move away from ioutil (deprecated) See merge request gitlab-org/gitlab-shell!511
Diffstat (limited to 'client/httpclient.go')
-rw-r--r--client/httpclient.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/httpclient.go b/client/httpclient.go
index a2ecfd0..72238f8 100644
--- a/client/httpclient.go
+++ b/client/httpclient.go
@@ -6,7 +6,6 @@ import (
"crypto/x509"
"errors"
"fmt"
- "io/ioutil"
"net"
"net/http"
"os"
@@ -139,7 +138,7 @@ func buildHttpsTransport(hcc httpClientCfg, selfSignedCert bool, gitlabURL strin
}
if hcc.caPath != "" {
- fis, _ := ioutil.ReadDir(hcc.caPath)
+ fis, _ := os.ReadDir(hcc.caPath)
for _, fi := range fis {
if fi.IsDir() {
continue
@@ -171,7 +170,7 @@ func buildHttpsTransport(hcc httpClientCfg, selfSignedCert bool, gitlabURL strin
}
func addCertToPool(certPool *x509.CertPool, fileName string) {
- cert, err := ioutil.ReadFile(fileName)
+ cert, err := os.ReadFile(fileName)
if err == nil {
certPool.AppendCertsFromPEM(cert)
}