Skip to content

Commit

Permalink
Move away from deprecated io/ioutil ReadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
justinabrahms committed Mar 26, 2023
1 parent 9d66eae commit 8d01bbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cdx/cdx_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cdx
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"strings"

cdx "github.com/CycloneDX/cyclonedx-go"
Expand Down Expand Up @@ -98,7 +98,7 @@ func (r *CycloneDXReport) CreationInfo() scorecard.ReportValue {
}

func GetCycloneDXReport(filename string) scorecard.SbomReport {
contents, err := ioutil.ReadFile(filename)
contents, err := os.ReadFile(filename)
if err != nil {
fmt.Printf("Error while opening %v for reading: %v", filename, err)
return nil
Expand Down

0 comments on commit 8d01bbc

Please sign in to comment.