Skip to content

Commit c09d682

Browse files
authored
Remove remaining ioutil usage (#1256)
Signed-off-by: Morten Linderud <[email protected]>
1 parent 894a3bc commit c09d682

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cmd/cosign/cli/fulcio/fulcioverifier/fulcioverifier_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package fulcioverifier
1717

1818
import (
1919
"fmt"
20-
"io/ioutil"
2120
"os"
2221
"reflect"
2322
"strings"
@@ -45,7 +44,7 @@ func TestGetAlternatePublicKey(t *testing.T) {
4544
}
4645
for _, tc := range tests {
4746
filepath := fmt.Sprintf("%s/testdata/%s", wd, tc.file)
48-
bytes, err := ioutil.ReadFile(filepath)
47+
bytes, err := os.ReadFile(filepath)
4948
if err != nil {
5049
t.Fatalf("Failed to read testfile %s : %v", tc.file, err)
5150
}

test/pkcs11_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import (
4545
"encoding/hex"
4646
"encoding/pem"
4747
"fmt"
48-
"io/ioutil"
4948
"math/big"
5049
"os"
5150
"strings"
@@ -351,7 +350,7 @@ func importKey(slotID uint) error {
351350
keyLabelBytes := []byte(keyLabel)
352351

353352
r := strings.NewReader(rsaPrivKey)
354-
pemBytes, err = ioutil.ReadAll(r)
353+
pemBytes, err = os.ReadAll(r)
355354
if err != nil {
356355
return fmt.Errorf("unable to read pem")
357356
}

0 commit comments

Comments
 (0)