Skip to content

Commit

Permalink
fix reviewdog warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ohill committed Apr 26, 2024
1 parent 0b091e8 commit 3c3447b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions config/datadir.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package config

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand All @@ -29,7 +28,7 @@ func algodStat(netpath string) (lastmod time.Time, err error) {
func AlgodArgsForDataDir(datadir string) (netAddr string, token string, lastmod time.Time, err error) {
netpath, tokenpath := algodPaths(datadir)
var netaddrbytes []byte
netaddrbytes, err = ioutil.ReadFile(netpath)
netaddrbytes, err = os.ReadFile(netpath)
if err != nil {
err = fmt.Errorf("%s: %v", netpath, err)
return
Expand All @@ -39,7 +38,7 @@ func AlgodArgsForDataDir(datadir string) (netAddr string, token string, lastmod
netAddr = "http://" + netAddr
}

tokenBytes, err := ioutil.ReadFile(tokenpath)
tokenBytes, err := os.ReadFile(tokenpath)
if err != nil {
err = fmt.Errorf("%s: %v", tokenpath, err)
return
Expand Down
2 changes: 1 addition & 1 deletion util/test/account_testutil.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package test

import (
"crypto/rand"
"crypto/sha512"
"fmt"
"math/rand"

"github.com/algorand/indexer/v3/util"

Expand Down
3 changes: 1 addition & 2 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -233,7 +232,7 @@ func ReadGenesis(in io.Reader) (sdk.Genesis, error) {
if in == nil {
return sdk.Genesis{}, fmt.Errorf("ReadGenesis() err: reader is nil")
}
gbytes, err := ioutil.ReadAll(in)
gbytes, err := io.ReadAll(in)
if err != nil {
return sdk.Genesis{}, fmt.Errorf("ReadGenesis() err: %w", err)
}
Expand Down

0 comments on commit 3c3447b

Please sign in to comment.