Skip to content

Commit

Permalink
Do not use deprecated ioutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
johnboyes authored Feb 10, 2024
1 parent d660656 commit 7f5b9f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/github/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -118,7 +117,7 @@ func (a *Action) pullRequestNumber() int {
githubEventJSONFile, err := os.Open(filepath.Clean(os.Getenv("GITHUB_EVENT_PATH")))
panic.IfError(err)
defer githubEventJSONFile.Close() //nolint
byteValue, _ := ioutil.ReadAll(githubEventJSONFile)
byteValue, _ := io.ReadAll(githubEventJSONFile)
panic.IfError(json.Unmarshal(byteValue, &event))

return event.PullRequest.Number
Expand Down

0 comments on commit 7f5b9f9

Please sign in to comment.