mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-25 21:06:24 +02:00
all: remove deprecated use of io/ioutil
This commit is contained in:
parent
12d8f92d33
commit
5ffd8db241
6 changed files with 9 additions and 14 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue