cleanup(all): stop using deprecated ioutil functions (#381)

Spotted while working on https://github.com/ooni/probe/issues/1417

See https://golang.org/pkg/io/ioutil/
This commit is contained in:
Simone Basso
2021-06-15 14:01:45 +02:00
committed by GitHub
parent 721ce95315
commit fd5405ade1
25 changed files with 64 additions and 72 deletions
@@ -3,6 +3,7 @@ package nettests
import (
"context"
"io/ioutil"
"os"
"path"
"testing"
@@ -11,11 +12,11 @@ import (
)
func copyfile(source, dest string) error {
data, err := ioutil.ReadFile(source)
data, err := os.ReadFile(source)
if err != nil {
return err
}
return ioutil.WriteFile(dest, data, 0600)
return os.WriteFile(dest, data, 0600)
}
func newOONIProbe(t *testing.T) *ooni.Probe {