Skip to content

Commit

Permalink
Merge pull request #24 from deining/discard-io-ioutil
Browse files Browse the repository at this point in the history
Get rid of deprecated package 'io/ioutil'
  • Loading branch information
makew0rld authored Dec 19, 2024
2 parents 298b40b + 0015ea9 commit e199d31
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 e199d31

Please sign in to comment.