Drop references to io/ioutil (#403)

io/ioutil has been deprecated for a while.
Replace all uses of it with equivalent APIs.
This commit is contained in:
Abhinav Gupta
2023-12-10 15:40:40 -08:00
committed by GitHub
parent 923c202213
commit 7391017a8c
6 changed files with 10 additions and 14 deletions
+1 -2
View File
@@ -2,7 +2,6 @@ package kong_test
import (
"encoding/json"
"io/ioutil"
"os"
"testing"
@@ -45,7 +44,7 @@ func TestConfigValidation(t *testing.T) {
func makeConfig(t *testing.T, config interface{}) (path string, cleanup func()) {
t.Helper()
w, err := ioutil.TempFile("", "")
w, err := os.CreateTemp("", "")
assert.NoError(t, err)
defer w.Close()
err = json.NewEncoder(w).Encode(config)