all: remove deprecated use of io/ioutil

This commit is contained in:
Will Norris 2023-01-31 20:30:38 -08:00
parent 12d8f92d33
commit 5ffd8db241
6 changed files with 9 additions and 14 deletions

View file

@ -4,7 +4,7 @@
package main
import (
"io/ioutil"
"io"
"net/url"
"os"
"reflect"
@ -25,7 +25,7 @@ func TestMainFunc(t *testing.T) {
main()
w.Close()
output, err := ioutil.ReadAll(r)
output, err := io.ReadAll(r)
got := string(output)
if err != nil {
t.Errorf("error reading from pipe: %v", err)
@ -94,7 +94,7 @@ func TestParseKey(t *testing.T) {
}
func TestParseKey_FilePath(t *testing.T) {
f, err := ioutil.TempFile("", "key")
f, err := os.CreateTemp("", "key")
if err != nil {
t.Errorf("error creating temp file: %v", err)
}