Skip to content

Commit

Permalink
Migrate from ioutil to os in testcli (flashbots#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruteri authored Aug 15, 2022
1 parent e83a51b commit 863c395
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/test-cli/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"encoding/json"
"io/ioutil"
"os"
"time"

"github.com/ethereum/go-ethereum/common/hexutil"
Expand All @@ -22,11 +22,11 @@ func (v *validatorPrivateData) SaveValidator(filePath string) error {
if err != nil {
return err
}
return ioutil.WriteFile(filePath, validatorData, 0644)
return os.WriteFile(filePath, validatorData, 0644)
}

func mustLoadValidator(filePath string) validatorPrivateData {
fileData, err := ioutil.ReadFile(filePath)
fileData, err := os.ReadFile(filePath)
if err != nil {
log.WithField("filePath", filePath).WithError(err).Fatal("Could not load validator data")
}
Expand Down

0 comments on commit 863c395

Please sign in to comment.