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

@@ -7,7 +7,6 @@ package main
import (
"bufio"
"fmt"
"io/ioutil"
"log"
"os"
"sort"
@@ -35,7 +34,7 @@ var Owners = []string{`
// to prevent `No newline at end of file` with gofmt
golist += "\n"
if err := ioutil.WriteFile("plugin/chaos/zowners.go", []byte(golist), 0644); err != nil {
if err := os.WriteFile("plugin/chaos/zowners.go", []byte(golist), 0644); err != nil {
log.Fatal(err)
}
return