mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 12:28:01 +08:00
Replaced deprecated io/ioutil functions (#768)
Signed-off-by: slab713 <109306207+slab713@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@ package cli //nolint:testpackage
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -70,7 +69,7 @@ func TestConfigCmdMain(t *testing.T) {
|
||||
cmd.SetArgs(args)
|
||||
_ = cmd.Execute()
|
||||
|
||||
actual, err := ioutil.ReadFile(file)
|
||||
actual, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -288,7 +287,7 @@ func TestConfigCmdMain(t *testing.T) {
|
||||
err := cmd.Execute()
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
actual, err := ioutil.ReadFile(configPath)
|
||||
actual, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -324,7 +323,7 @@ func TestConfigCmdMain(t *testing.T) {
|
||||
err := cmd.Execute()
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
actual, err := ioutil.ReadFile(configPath)
|
||||
actual, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -347,7 +346,7 @@ func TestConfigCmdMain(t *testing.T) {
|
||||
err := cmd.Execute()
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
actual, err := ioutil.ReadFile(configPath)
|
||||
actual, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user