go: removed io/ioutil
Since the minimum required version of Go has been bumped to 1.16, the deprecation of io/ioutil can now be acted upon. This Commit removes the remaining dependencies on ioutil and replaces them with their io or os counterparts. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
1b91b68e73
commit
9cffc45f03
20 changed files with 34 additions and 47 deletions
worker/lib
|
@ -2,7 +2,6 @@ package lib
|
|||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
@ -12,7 +11,7 @@ import (
|
|||
|
||||
func TestMessageInfoParser(t *testing.T) {
|
||||
rootDir := "testdata/message/valid"
|
||||
msgFiles, err := ioutil.ReadDir(rootDir)
|
||||
msgFiles, err := os.ReadDir(rootDir)
|
||||
die(err)
|
||||
|
||||
for _, fi := range msgFiles {
|
||||
|
@ -37,7 +36,7 @@ func TestMessageInfoParser(t *testing.T) {
|
|||
|
||||
func TestMessageInfoHandledError(t *testing.T) {
|
||||
rootDir := "testdata/message/invalid"
|
||||
msgFiles, err := ioutil.ReadDir(rootDir)
|
||||
msgFiles, err := os.ReadDir(rootDir)
|
||||
die(err)
|
||||
|
||||
for _, fi := range msgFiles {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue