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
commit fd5405ade1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 64 additions and 72 deletions

View file

@ -43,11 +43,11 @@ func TestUpdateConfig(t *testing.T) {
configPath := tmpFile.Name()
defer os.Remove(configPath)
data, err := ioutil.ReadFile("testdata/config-v0.json")
data, err := os.ReadFile("testdata/config-v0.json")
if err != nil {
t.Error(err)
}
err = ioutil.WriteFile(configPath, data, 0644)
err = os.WriteFile(configPath, data, 0644)
if err != nil {
t.Error(err)
}