mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 02:03:13 -05:00
cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ package main
|
||||
import (
|
||||
"bufio"
|
||||
"go/format"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -101,7 +100,7 @@ func formatAndWrite(file string, data string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = ioutil.WriteFile(file, res, 0644); err != nil {
|
||||
if err = os.WriteFile(file, res, 0644); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user