Skip to content

Commit

Permalink
chore: remove refs to deprecated io/ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Nov 22, 2024
1 parent 4999d4c commit 32a3dc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
Expand Down Expand Up @@ -60,7 +59,7 @@ func writeCard(path string, card interface{}) {
case path == "/dev/stderr":
writeCardTo(os.Stderr, data)
case path != "":
ioutil.WriteFile(path, data, 0644)
os.WriteFile(path, data, 0644)
}
}

Expand Down
5 changes: 2 additions & 3 deletions cmd/drone-ecr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -89,7 +88,7 @@ func main() {
}

if lifecyclePolicy != "" {
p, err := ioutil.ReadFile(lifecyclePolicy)
p, err := os.ReadFile(lifecyclePolicy)
if err != nil {
log.Fatal(err)
}
Expand All @@ -99,7 +98,7 @@ func main() {
}

if repositoryPolicy != "" {
p, err := ioutil.ReadFile(repositoryPolicy)
p, err := os.ReadFile(repositoryPolicy)
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 32a3dc5

Please sign in to comment.