Skip to content

Commit

Permalink
remove deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Mar 29, 2023
1 parent 3e7265c commit 1e3547e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
22 changes: 11 additions & 11 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<tbody><tr>
<th>Go</th>
<th>36</th>
<th>9173</th>
<th>1459</th>
<th>443</th>
<th>7271</th>
<th>9177</th>
<th>1461</th>
<th>444</th>
<th>7272</th>
<th>1506</th>
<th>371848</th>
<th>372075</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand All @@ -44,7 +44,7 @@
<th>0</th>
<th>1087</th>
<th>0</th>
<th>57802</th>
<th>57793</th>
</tr><tr>
<th>Python</th>
<th>10</th>
Expand Down Expand Up @@ -679,11 +679,11 @@
<tfoot><tr>
<th>Total</th>
<th>187</th>
<th>30363</th>
<th>3386</th>
<th>1933</th>
<th>25044</th>
<th>30367</th>
<th>3388</th>
<th>1934</th>
<th>25045</th>
<th>2662</th>
<th>1917134</th>
<th>1917352</th>
</tr></tfoot>
</table></body></html>
3 changes: 1 addition & 2 deletions processor/formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"math"
"os"
"path/filepath"
Expand Down Expand Up @@ -763,7 +762,7 @@ func fileSummarizeMulti(input chan *FileJob) string {
str.WriteString(val)
str.WriteString("\n")
} else {
err := ioutil.WriteFile(t[1], []byte(val), 0600)
err := os.WriteFile(t[1], []byte(val), 0600)
if err != nil {
fmt.Printf("%s unable to be written to for format %s: %s", t[1], t[0], err)
}
Expand Down
3 changes: 1 addition & 2 deletions processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package processor
import (
"encoding/base64"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -571,7 +570,7 @@ func Process() {
if FileOutput == "" {
fmt.Println(result)
} else {
_ = ioutil.WriteFile(FileOutput, []byte(result), 0644)
_ = os.WriteFile(FileOutput, []byte(result), 0644)
fmt.Println("results written to " + FileOutput)
}
}
5 changes: 2 additions & 3 deletions scripts/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
)
Expand All @@ -22,8 +21,8 @@ func fatalf(f string, v ...interface{}) {
// Reads all .json files in the current folder
// and encodes them as strings literals in constants.go
func generateConstants() error {
files, _ := ioutil.ReadDir(".")
out, err := ioutil.TempFile(".", "temp_constants")
files, _ := os.ReadDir(".")
out, err := os.CreateTemp(".", "temp_constants")
if err != nil {
return fmt.Errorf("failed to open temp file: %v", err)
}
Expand Down

0 comments on commit 1e3547e

Please sign in to comment.