chore: make fmt.Errorf use %w to wrap error instead of %v (#20350)

This commit is contained in:
Hoa Nguyen
2024-05-12 08:11:25 +00:00
committed by GitHub
parent 6853ba0468
commit 22aa95ccbd
20 changed files with 42 additions and 37 deletions
+2 -2
View File
@@ -823,11 +823,11 @@ func testnetify[T types.Application](ctx *Context, testnetAppCreator types.AppCr
_, _, _, _, _, proxyMetrics, _, _ := metrics(genDoc.ChainID) // nolint: dogsled // function from comet
proxyApp := proxy.NewAppConns(clientCreator, proxyMetrics)
if err := proxyApp.Start(); err != nil {
return nil, fmt.Errorf("error starting proxy app connections: %v", err)
return nil, fmt.Errorf("error starting proxy app connections: %w", err)
}
res, err := proxyApp.Query().Info(context, proxy.InfoRequest)
if err != nil {
return nil, fmt.Errorf("error calling Info: %v", err)
return nil, fmt.Errorf("error calling Info: %w", err)
}
err = proxyApp.Stop()
if err != nil {
+1 -1
View File
@@ -3,7 +3,7 @@ package appmanager
// Config represents the configuration options for the app manager.
// TODO: implement comments for toml
type Config struct {
ValidateTxGasLimit uint64 `mapstructure:"validate-tx-gas-limit"` //TODO: check how this works on app mempool
ValidateTxGasLimit uint64 `mapstructure:"validate-tx-gas-limit"` // TODO: check how this works on app mempool
QueryGasLimit uint64 `mapstructure:"query-gas-limit"`
SimulationGasLimit uint64 `mapstructure:"simulation-gas-limit"`
}