Skip to content

Commit

Permalink
Merge pull request #1421 from vmware/chore/remove-io-ioutil
Browse files Browse the repository at this point in the history
chore: remove use of `io/ioutil`
  • Loading branch information
ksamoray authored Jan 9, 2025
2 parents 3582ca0 + e65b291 commit 45f3dad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nsxt/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"crypto/x509"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"math/rand"
"net/http"
Expand Down Expand Up @@ -722,7 +722,7 @@ func (v *vmcAuthInfo) getAPIToken() (string, error) {
return "", err
}
if res.StatusCode != 200 {
b, _ := ioutil.ReadAll(res.Body)
b, _ := io.ReadAll(res.Body)
return "", fmt.Errorf("unexpected status code %d trying to get auth token. %s", res.StatusCode, string(b))
}

Expand Down Expand Up @@ -784,7 +784,7 @@ func getConnectorTLSConfig(d *schema.ResourceData) (*tls.Config, error) {
}

if len(caFile) > 0 {
caCert, err := ioutil.ReadFile(caFile)
caCert, err := os.ReadFile(caFile)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 45f3dad

Please sign in to comment.