Skip to content

Commit

Permalink
Remove usage of deprecated ioutils
Browse files Browse the repository at this point in the history
  • Loading branch information
palango committed Feb 26, 2024
1 parent 8b38d39 commit 0b276ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions service/geth/geth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -174,7 +173,7 @@ func (gs *gethService) setupStaticNodes() error {
return fmt.Errorf("Can't serialize static nodes: %w", err)
}
//nolint:gosec
if err = ioutil.WriteFile(gs.opts.StaticNodesFile(), staticNodesRaw, 0644); err != nil {
if err = os.WriteFile(gs.opts.StaticNodesFile(), staticNodesRaw, 0644); err != nil {
return fmt.Errorf("Can't serialize static nodes: %w", err)
}

Expand Down Expand Up @@ -300,7 +299,7 @@ func (gopts GethOpts) StaticNodesFile() string {
}

func chainConfigFromGenesisFile(genesisPath string) *params.ChainConfig {
data, err := ioutil.ReadFile(genesisPath)
data, err := os.ReadFile(genesisPath)
if err != nil {
log.Crit("Can't read genesis.json on DataDir", "genesisPath", genesisPath, "err", err)
}
Expand Down

0 comments on commit 0b276ce

Please sign in to comment.