Skip to content

Commit

Permalink
diagnostics: fix a couple of lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
srackham committed Jan 21, 2025
1 parent 2d3f712 commit fbfa1cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions rimugo/rimugo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"embed"
"fmt"
"io/ioutil"
"io"
"os"
"os/user"
"path"
Expand Down Expand Up @@ -190,7 +190,7 @@ outer:
}
opts.SafeMode = 0 // Resources are trusted.
case infile == STDIN:
bytes, _ := ioutil.ReadAll(os.Stdin)
bytes, _ := io.ReadAll(os.Stdin)
source = string(bytes)
opts.SafeMode = safeMode
case infile == PREPEND:
Expand All @@ -200,7 +200,7 @@ outer:
if !fileExists(infile) {
die("source file does not exist: " + infile)
}
bytes, err := ioutil.ReadFile(infile)
bytes, err := os.ReadFile(infile)
if err != nil {
die(err.Error())
}
Expand Down Expand Up @@ -239,7 +239,7 @@ outer:
if outfile == "" || outfile == "-" {
fmt.Print(output)
} else {
err := ioutil.WriteFile(outfile, []byte(output), 0644)
err := os.WriteFile(outfile, []byte(output), 0644)
if err != nil {
die(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions rimugo/rimugo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"io"
"io/ioutil"
"os"
"os/exec"
"runtime"
"strings"
Expand All @@ -24,7 +24,7 @@ type rimucTest struct {

func TestRimuc(t *testing.T) {
// Execute tests specified in JSON file.
raw, err := ioutil.ReadFile("./testdata/rimuc-tests.json")
raw, err := os.ReadFile("./testdata/rimuc-tests.json")
if err != nil {
t.Error(err.Error())
return
Expand Down

0 comments on commit fbfa1cc

Please sign in to comment.