diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-19 15:54:20 +0000 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-19 15:54:20 +0000 |
commit | 087c010c476ed6c009b6c94a76a7e9db3b9d3fdd (patch) | |
tree | c68aac4473adea2eae5ead5d49c173f80dac3e8c /client/httpclient.go | |
parent | a83f8b31982222ad64b23a47ee6d092042cf9f1a (diff) | |
download | gitlab-shell-087c010c476ed6c009b6c94a76a7e9db3b9d3fdd.tar.gz |
refactor: move away from ioutil (deprecated)
Diffstat (limited to 'client/httpclient.go')
-rw-r--r-- | client/httpclient.go | 5 |
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) } |