Get rid of the latest ioutil bits

This commit is contained in:
Frank Denis 2023-02-02 19:44:51 +01:00
parent 3f23ff5c08
commit 5f88a9146c
2 changed files with 3 additions and 4 deletions

View File

@ -97,7 +97,7 @@ disabled_server_names = []
force_tcp = false
## Enable support for HTTP/3 (DoH3, HTTP over QUIC)
## Enable *experimental* support for HTTP/3 (DoH3, HTTP over QUIC)
## Note that, like DNSCrypt but unlike other HTTP versions, this uses
## UDP and (usually) port 443 instead of TCP.

View File

@ -3,7 +3,6 @@ package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
@ -134,7 +133,7 @@ func loadSnakeoil(t *testing.T, d *SourceTestData) {
}
func loadTestSourceNames(t *testing.T, d *SourceTestData) {
files, err := ioutil.ReadDir(filepath.Join("testdata", "sources"))
files, err := os.ReadDir(filepath.Join("testdata", "sources"))
if err != nil {
t.Fatalf("Unable to load list of test sources: %v", err)
}
@ -196,7 +195,7 @@ func loadFixtures(t *testing.T, d *SourceTestData) {
}
func makeTempDir(t *testing.T, d *SourceTestData) {
name, err := ioutil.TempDir("", "sources_test.go."+t.Name())
name, err := os.MkdirTemp("", "sources_test.go."+t.Name())
if err != nil {
t.Fatalf("Unable to create temporary directory: %v", err)
}