Skip to content

Commit

Permalink
Removing calls to deprecates io/ioutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
iwankgb committed May 8, 2023
1 parent e678bca commit d6277f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/internal/storage/bigquery/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"os"
"strings"

"golang.org/x/oauth2"
Expand Down Expand Up @@ -62,7 +62,7 @@ func connect() (*oauth2.Token, *bigquery.Service, error) {
if *pemFile == "" {
return nil, nil, fmt.Errorf("no credentials specified")
}
pemBytes, err := ioutil.ReadFile(*pemFile)
pemBytes, err := os.ReadFile(*pemFile)
if err != nil {
return nil, nil, fmt.Errorf("could not access credential file %v - %v", pemFile, err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/internal/storage/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"crypto/x509"
"encoding/json"
"flag"
"io/ioutil"
"log"
"os"
"strings"
Expand Down Expand Up @@ -110,7 +109,7 @@ func generateTLSConfig() (*tls.Config, error) {
return nil, err
}

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

0 comments on commit d6277f9

Please sign in to comment.