Skip to content

Commit

Permalink
Remove deprecated calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bdwyertech committed Feb 23, 2024
1 parent 7a80a3a commit 81b5847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions ecr-scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/url"
"os"
"path"
Expand Down Expand Up @@ -101,7 +100,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
yamlFile, err := ioutil.ReadFile(path.Join(pwd, ".ecr-scanner.yml"))
yamlFile, err := os.ReadFile(path.Join(pwd, ".ecr-scanner.yml"))
if err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions helper-utility/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"context"
"io/ioutil"
"io"
"log"
"os"
"os/user"
Expand Down Expand Up @@ -34,7 +34,7 @@ func main() {
}
defer jsonFile.Close()

byteValue, err := ioutil.ReadAll(jsonFile)
byteValue, err := io.ReadAll(jsonFile)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -113,7 +113,7 @@ func getParameter(key string) string {

resp, err := ssmClient.GetParameter(context.Background(), &ssm.GetParameterInput{
Name: aws.String(prm),
WithDecryption: true,
WithDecryption: aws.Bool(true),
})
if err != nil {
log.Fatalf("ERROR: ssm.GetParameter:: %s\n%s", key, err)
Expand Down

0 comments on commit 81b5847

Please sign in to comment.