Skip to content

Commit

Permalink
gofumpt -w -l
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed May 3, 2022
1 parent c934600 commit 538d5dc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
9 changes: 9 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- init: go get && go build ./... && go test ./... && make
command: go run


2 changes: 1 addition & 1 deletion ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}

var sigGasConsumer = opts.SigGasConsumer
sigGasConsumer := opts.SigGasConsumer
if sigGasConsumer == nil {
sigGasConsumer = ante.DefaultSigVerificationGasConsumer
}
Expand Down
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ func NewGaiaApp(
appOpts servertypes.AppOptions,
baseAppOptions ...func(*baseapp.BaseApp),
) *GaiaApp {

appCodec := encodingConfig.Marshaler
legacyAmino := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry
Expand Down Expand Up @@ -629,7 +628,6 @@ func NewGaiaApp(
app.UpgradeKeeper.SetUpgradeHandler(
upgradeName,
func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {

fromVM[icatypes.ModuleName] = icaModule.ConsensusVersion()
// create ICS27 Controller submodule params
controllerParams := icacontrollertypes.Params{}
Expand Down
2 changes: 0 additions & 2 deletions cmd/gaiad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ func (ac appCreator) newApp(
traceStore io.Writer,
appOpts servertypes.AppOptions,
) servertypes.Application {

var cache sdk.MultiStorePersistentCache

if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) {
Expand Down Expand Up @@ -245,7 +244,6 @@ func (ac appCreator) appExport(
jailAllowedAddrs []string,
appOpts servertypes.AppOptions,
) (servertypes.ExportedApp, error) {

homePath, ok := appOpts.Get(flags.FlagHome).(string)
if !ok || homePath == "" {
return servertypes.ExportedApp{}, errors.New("application home is not set")
Expand Down
9 changes: 3 additions & 6 deletions cmd/gaiad/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Example:
return cmd
}

const nodeDirPerm = 0755
const nodeDirPerm = 0o755

// Initialize the testnet
func InitTestnet(
Expand All @@ -117,7 +117,6 @@ func InitTestnet(
algoStr string,
numValidators int,
) error {

if chainID == "" {
chainID = "chain-" + tmrand.NewRand().Str(6)
}
Expand Down Expand Up @@ -281,7 +280,6 @@ func initGenFiles(
genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance,
genFiles []string, numValidators int,
) error {

appGenState := mbm.DefaultGenesis(clientCtx.Codec)

// set the accounts in the genesis state
Expand Down Expand Up @@ -330,7 +328,6 @@ func collectGenFiles(
nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int,
outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator,
) error {

var appState json.RawMessage
genTime := tmtime.Now()

Expand Down Expand Up @@ -398,12 +395,12 @@ func calculateIP(ip string, i int) (string, error) {
func writeFile(name string, dir string, contents []byte) error {
file := filepath.Join(dir, name)

err := tmos.EnsureDir(dir, 0755)
err := tmos.EnsureDir(dir, 0o755)
if err != nil {
return err
}

err = tmos.WriteFile(file, contents, 0644)
err = tmos.WriteFile(file, contents, 0o644)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (s *IntegrationTestSuite) runIBCRelayer() {
gaiaBVal := s.chainB.validators[0]
hermesCfgPath := path.Join(tmpDir, "hermes")

s.Require().NoError(os.MkdirAll(hermesCfgPath, 0755))
s.Require().NoError(os.MkdirAll(hermesCfgPath, 0o755))
_, err = copyFile(
filepath.Join("./scripts/", "hermes_bootstrap.sh"),
filepath.Join(hermesCfgPath, "hermes_bootstrap.sh"),
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ func writeFile(path string, body []byte) error {
return err
}

return ioutil.WriteFile(path, body, 0600)
return ioutil.WriteFile(path, body, 0o600)
}
6 changes: 3 additions & 3 deletions tests/e2e/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (v *validator) configDir() string {

func (v *validator) createConfig() error {
p := path.Join(v.configDir(), "config")
return os.MkdirAll(p, 0755)
return os.MkdirAll(p, 0o755)
}

func (v *validator) init() error {
Expand Down Expand Up @@ -109,12 +109,12 @@ func (v *validator) createConsensusKey() error {
config.Moniker = v.moniker

pvKeyFile := config.PrivValidatorKeyFile()
if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0777); err != nil {
if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil {
return err
}

pvStateFile := config.PrivValidatorStateFile()
if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0777); err != nil {
if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil {
return err
}

Expand Down

0 comments on commit 538d5dc

Please sign in to comment.