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

@@ -3,7 +3,6 @@ package sign
import (
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
@@ -15,7 +14,7 @@ import (
// write writes out the zone file to a temporary file which is then moved into the correct place.
func (s *Signer) write(z *file.Zone) error {
f, err := ioutil.TempFile(s.directory, "signed-")
f, err := os.CreateTemp(s.directory, "signed-")
if err != nil {
return err
}