@@ -2,7 +2,6 @@ package list
22
33import (
44 "encoding/json"
5- "io/ioutil"
65 "os"
76 "reflect"
87 "strings"
@@ -13,7 +12,7 @@ import (
1312
1413// Helper function to read issues from a file.
1514func ReadIssues (path string ) []issues.Issue {
16- raw , _ := ioutil .ReadFile (path )
15+ raw , _ := os .ReadFile (path )
1716 var fetchedIssues []issues.Issue
1817 _ = json .Unmarshal (raw , & fetchedIssues )
1918
@@ -26,8 +25,8 @@ func TestListCSV(t *testing.T) {
2625 opts .exportCSV ("./testdata/exported.csv" )
2726
2827 // read exported and test CSV files
29- exported , _ := ioutil .ReadFile ("./testdata/exported.csv" )
30- test , _ := ioutil .ReadFile ("./testdata/csv/test.csv" )
28+ exported , _ := os .ReadFile ("./testdata/exported.csv" )
29+ test , _ := os .ReadFile ("./testdata/csv/test.csv" )
3130
3231 // trim carriage returns
3332 got := strings .TrimSuffix (string (exported ), "\n " )
@@ -47,8 +46,8 @@ func TestListJSON(t *testing.T) {
4746 opts .exportJSON ("./testdata/exported.json" )
4847
4948 // read exported and test JSON files
50- exported , _ := ioutil .ReadFile ("./testdata/exported.json" )
51- test , _ := ioutil .ReadFile ("./testdata/json/test.json" )
49+ exported , _ := os .ReadFile ("./testdata/exported.json" )
50+ test , _ := os .ReadFile ("./testdata/json/test.json" )
5251
5352 // trim carriage returns
5453 got := strings .TrimSuffix (string (exported ), "\n " )
@@ -71,8 +70,8 @@ func TestListSARIF(t *testing.T) {
7170 opts .exportSARIF ("./testdata/exported.sarif" )
7271
7372 // read exported and test SARIF files
74- exported , _ := ioutil .ReadFile ("./testdata/exported.sarif" )
75- test , _ := ioutil .ReadFile ("./testdata/sarif/test.sarif" )
73+ exported , _ := os .ReadFile ("./testdata/exported.sarif" )
74+ test , _ := os .ReadFile ("./testdata/sarif/test.sarif" )
7675
7776 // trim carriage returns
7877 got := strings .TrimSuffix (string (exported ), "\n " )
@@ -94,8 +93,8 @@ func TestListSARIF(t *testing.T) {
9493 opts .exportSARIF ("./testdata/exported_multi.sarif" )
9594
9695 // read exported and test SARIF files
97- exported , _ := ioutil .ReadFile ("./testdata/exported_multi.sarif" )
98- test , _ := ioutil .ReadFile ("./testdata/sarif/test_multi.sarif" )
96+ exported , _ := os .ReadFile ("./testdata/exported_multi.sarif" )
97+ test , _ := os .ReadFile ("./testdata/sarif/test_multi.sarif" )
9998
10099 // trim carriage returns
101100 got := strings .TrimSuffix (string (exported ), "\n " )
0 commit comments