resolve ioutil deprecations

This commit is contained in:
Mikaël Cluseau
2025-01-26 11:31:04 +01:00
parent ce8b7f01ef
commit 82f7cbcc92
7 changed files with 14 additions and 21 deletions

View File

@ -3,7 +3,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"os"
"sort"
)
@ -23,7 +22,7 @@ func read(path string) (ba []byte, err error) {
}
defer r.Close()
return ioutil.ReadAll(r)
return io.ReadAll(r)
}
err = fmt.Errorf("%s: %w", path, os.ErrNotExist)