Skip to content

Commit 1e3547e

Browse files
committed
remove deprecated functions
1 parent 3e7265c commit 1e3547e

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

SCC-OUTPUT-REPORT.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
<tbody><tr>
1313
<th>Go</th>
1414
<th>36</th>
15-
<th>9173</th>
16-
<th>1459</th>
17-
<th>443</th>
18-
<th>7271</th>
15+
<th>9177</th>
16+
<th>1461</th>
17+
<th>444</th>
18+
<th>7272</th>
1919
<th>1506</th>
20-
<th>371848</th>
20+
<th>372075</th>
2121
</tr><tr>
2222
<th>Java</th>
2323
<th>24</th>
@@ -44,7 +44,7 @@
4444
<th>0</th>
4545
<th>1087</th>
4646
<th>0</th>
47-
<th>57802</th>
47+
<th>57793</th>
4848
</tr><tr>
4949
<th>Python</th>
5050
<th>10</th>
@@ -679,11 +679,11 @@
679679
<tfoot><tr>
680680
<th>Total</th>
681681
<th>187</th>
682-
<th>30363</th>
683-
<th>3386</th>
684-
<th>1933</th>
685-
<th>25044</th>
682+
<th>30367</th>
683+
<th>3388</th>
684+
<th>1934</th>
685+
<th>25045</th>
686686
<th>2662</th>
687-
<th>1917134</th>
687+
<th>1917352</th>
688688
</tr></tfoot>
689689
</table></body></html>

processor/formatters.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/csv"
88
"encoding/json"
99
"fmt"
10-
"io/ioutil"
1110
"math"
1211
"os"
1312
"path/filepath"
@@ -763,7 +762,7 @@ func fileSummarizeMulti(input chan *FileJob) string {
763762
str.WriteString(val)
764763
str.WriteString("\n")
765764
} else {
766-
err := ioutil.WriteFile(t[1], []byte(val), 0600)
765+
err := os.WriteFile(t[1], []byte(val), 0600)
767766
if err != nil {
768767
fmt.Printf("%s unable to be written to for format %s: %s", t[1], t[0], err)
769768
}

processor/processor.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package processor
55
import (
66
"encoding/base64"
77
"fmt"
8-
"io/ioutil"
98
"os"
109
"path/filepath"
1110
"runtime"
@@ -571,7 +570,7 @@ func Process() {
571570
if FileOutput == "" {
572571
fmt.Println(result)
573572
} else {
574-
_ = ioutil.WriteFile(FileOutput, []byte(result), 0644)
573+
_ = os.WriteFile(FileOutput, []byte(result), 0644)
575574
fmt.Println("results written to " + FileOutput)
576575
}
577576
}

scripts/include.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/json"
88
"fmt"
99
"io"
10-
"io/ioutil"
1110
"os"
1211
"strings"
1312
)
@@ -22,8 +21,8 @@ func fatalf(f string, v ...interface{}) {
2221
// Reads all .json files in the current folder
2322
// and encodes them as strings literals in constants.go
2423
func generateConstants() error {
25-
files, _ := ioutil.ReadDir(".")
26-
out, err := ioutil.TempFile(".", "temp_constants")
24+
files, _ := os.ReadDir(".")
25+
out, err := os.CreateTemp(".", "temp_constants")
2726
if err != nil {
2827
return fmt.Errorf("failed to open temp file: %v", err)
2928
}

0 commit comments

Comments
 (0)