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
26 changed files with 53 additions and 72 deletions

View File

@@ -1,7 +1,6 @@
package test
import (
"io/ioutil"
"os"
"testing"
@@ -56,10 +55,10 @@ func TestLookupBalanceRewriteCacheDnssec(t *testing.T) {
}
func createKeyFile(t *testing.T) func() {
ioutil.WriteFile(base+".key",
os.WriteFile(base+".key",
[]byte(`example.org. IN DNSKEY 256 3 13 tDyI0uEIDO4SjhTJh1AVTFBLpKhY3He5BdAlKztewiZ7GecWj94DOodg ovpN73+oJs+UfZ+p9zOSN5usGAlHrw==`),
0644)
ioutil.WriteFile(base+".private",
os.WriteFile(base+".private",
[]byte(`Private-key-format: v1.3
Algorithm: 13 (ECDSAP256SHA256)
PrivateKey: HPmldSNfrkj/aDdUMFwuk/lgzaC5KIsVEG3uoYvF4pQ=