Skip to content

Commit e1d6cd9

Browse files
davidbenBoringssl LUCI CQ
authored andcommitted
Migrate remaining uses of io/ioutil
See https://go.dev/doc/go1.16#ioutil Change-Id: Ib0fa34a745f1d1515729a0eead96fe5dfcf86a21 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/77387 Auto-Submit: David Benjamin <[email protected]> Reviewed-by: Adam Langley <[email protected]> Commit-Queue: Adam Langley <[email protected]> Commit-Queue: David Benjamin <[email protected]>
1 parent a2fdeb1 commit e1d6cd9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

util/fipstools/acvp/acvptool/acvp.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"flag"
3030
"fmt"
3131
"io"
32-
"io/ioutil"
3332
"log"
3433
"net/http"
3534
neturl "net/url"
@@ -587,15 +586,15 @@ func uploadResultsDirectory(directory string, config *Config, sessionTokensCache
587586

588587
var results []nistUploadResult
589588
// Read directory, identify, and process all files.
590-
files, err := ioutil.ReadDir(directory)
589+
files, err := os.ReadDir(directory)
591590
if err != nil {
592591
log.Fatalf("Unable to read directory: %s", err)
593592
}
594593

595594
for _, file := range files {
596595
// Add contents of the result file to results.
597596
filePath := filepath.Join(directory, file.Name())
598-
content, err := ioutil.ReadFile(filePath)
597+
content, err := os.ReadFile(filePath)
599598
if err != nil {
600599
log.Fatalf("Cannot open input: %s", err)
601600
}

util/fipstools/hex-search-modify.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"bytes"
3333
"encoding/hex"
3434
"fmt"
35-
"io/ioutil"
3635
"os"
3736
)
3837

@@ -53,7 +52,7 @@ func main() {
5352
}
5453

5554
// Read file contents
56-
content, err := ioutil.ReadFile(filePath)
55+
content, err := os.ReadFile(filePath)
5756
if err != nil {
5857
fmt.Fprintln(os.Stderr, "Error reading file:", err)
5958
os.Exit(1)

0 commit comments

Comments
 (0)