From 0015ea931e134c870d0d962fd937587bc82c599d Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Mon, 28 Oct 2024 21:58:29 +0100 Subject: [PATCH] Get rid of deprecated package 'io/ioutil' --- subcommands.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subcommands.go b/subcommands.go index 7ce7235..58e789e 100644 --- a/subcommands.go +++ b/subcommands.go @@ -6,7 +6,6 @@ import ( "fmt" "image/color" "image/png" - "io/ioutil" "math/rand" "os" "path/filepath" @@ -392,7 +391,7 @@ func odm(c *cli.Context) error { // Either inline JSON, path to file, or an error err := json.Unmarshal([]byte(args[0]), &matrix) if err != nil { - bytes, err := ioutil.ReadFile(args[0]) + bytes, err := os.ReadFile(args[0]) if err != nil { return errors.New("couldn't process argument as matrix name, inline JSON, or path to accessible JSON file") } @@ -461,7 +460,7 @@ func edm(c *cli.Context) error { // Either inline JSON, path to file, or an error err := json.Unmarshal([]byte(args[0]), &matrix) if err != nil { - bytes, err := ioutil.ReadFile(args[0]) + bytes, err := os.ReadFile(args[0]) if err != nil { return errors.New("couldn't process argument as matrix name, inline JSON, or path to accessible JSON file") }