Replace deprecated ioutil package

This commit is contained in:
Paul van Brouwershaven
2023-02-20 15:46:37 +01:00
parent 9d4a20b926
commit 007b08d4d1
4 changed files with 13 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ import (
"crypto/x509"
"encoding/base64"
"fmt"
"io/ioutil"
"io"
"net/http"
"strings"
@@ -27,7 +27,7 @@ func embedOCSPRevocationStatus(cert, issuer *x509.Certificate, i *revocation.Inf
return err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
@@ -49,7 +49,7 @@ func embedCRLRevocationStatus(cert, issuer *x509.Certificate, i *revocation.Info
return err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}