Skip to content

Commit

Permalink
Get rid of deprecated package 'io/ioutil'
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Oct 28, 2024
1 parent 298b40b commit 0015ea9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions subcommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"image/color"
"image/png"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 0015ea9

Please sign in to comment.