cleanup deprecated package io/ioutil (#4920)

Signed-off-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
Zou Nengren 2021-10-13 15:30:31 +08:00 committed by GitHub
parent 44fcca0e0d
commit 5191959bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 53 additions and 72 deletions

View file

@ -2,7 +2,6 @@ package file
import (
"context"
"io/ioutil"
"os"
"strings"
"testing"
@ -56,7 +55,7 @@ func TestZoneReload(t *testing.T) {
if len(rrs) != 5 {
t.Fatalf("Expected 5 RRs, got %d", len(rrs))
}
if err := ioutil.WriteFile(fileName, []byte(reloadZone2Test), 0644); err != nil {
if err := os.WriteFile(fileName, []byte(reloadZone2Test), 0644); err != nil {
t.Fatalf("Failed to write new zone data: %s", err)
}
// Could still be racy, but we need to wait a bit for the event to be seen