Skip to content

Commit

Permalink
refactor: remove io/ioutil (tendermint#939)
Browse files Browse the repository at this point in the history
* replace ioutil

* format:
  • Loading branch information
Alex Johnson authored Aug 29, 2022
1 parent 985b629 commit e03ca55
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func (app *App) ExportAppStateAndValidators(

// prepare for fresh start at zero height
// NOTE zero height genesis is a temporary feature which will be deprecated
// in favour of export at a block height
//
// in favour of export at a block height
func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
applyAllowedAddrs := false

Expand Down
1 change: 1 addition & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ package docs
import "embed"

// Docs represents the embedded doc file
//
//go:embed static
var Docs embed.FS
4 changes: 2 additions & 2 deletions x/launch/client/cli/tx_create_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
neturl "net/url"
Expand Down Expand Up @@ -117,7 +117,7 @@ func getHashFromURL(ctx context.Context, url string) (string, error) {
if res.StatusCode != http.StatusOK {
return "", fmt.Errorf("genesis url fetch error %s", res.Status)
}
initialGenesis, err := ioutil.ReadAll(res.Body)
initialGenesis, err := io.ReadAll(res.Body)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions x/launch/client/cli/tx_request_add_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

import (
"encoding/base64"
"io/ioutil"
"os"
"strconv"

"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -31,7 +31,7 @@ func CmdRequestAddValidator() *cobra.Command {
}

// Read gentxFile
gentxBytes, err := ioutil.ReadFile(args[1])
gentxBytes, err := os.ReadFile(args[1])
if err != nil {
return err
}
Expand Down

0 comments on commit e03ca55

Please sign in to comment.