1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-19 14:57:04 +00:00

Replace uses of ioutil

ioutil package was deprecated in Go 1.16, replace all uses with their
respective replacements.

This patch was generated with a combination of `gofmt -r`, `eg`, and
manually (for `ioutil.ReadDir`).
This commit is contained in:
Alberto Bertogli
2022-11-12 20:02:52 +00:00
parent 008367d320
commit 3ebe5c5173
22 changed files with 42 additions and 61 deletions

View File

@@ -10,7 +10,6 @@ import (
"flag"
"fmt"
"html/template"
"io/ioutil"
"math"
"os"
"strings"
@@ -50,7 +49,7 @@ func main() {
totals.Add(p)
fname := strings.Join(strings.Split(p.FileName, "/")[*strip:], "/")
src, err := ioutil.ReadFile(fname)
src, err := os.ReadFile(fname)
if err != nil {
errorf("Failed to read %q: %v", fname, err)
}