cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
parent
44fcca0e0d
commit
5191959bd7
26 changed files with 53 additions and 72 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue