style: enable strict gofumpt (#15579)
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
// DefaultContext creates a sdk.Context with a fresh MemDB that can be used in tests.
|
||||
func DefaultContext(key storetypes.StoreKey, tkey storetypes.StoreKey) sdk.Context {
|
||||
func DefaultContext(key, tkey storetypes.StoreKey) sdk.Context {
|
||||
db := dbm.NewMemDB()
|
||||
cms := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics())
|
||||
cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db)
|
||||
@@ -37,7 +37,7 @@ type TestContext struct {
|
||||
CMS store.CommitMultiStore
|
||||
}
|
||||
|
||||
func DefaultContextWithDB(t *testing.T, key storetypes.StoreKey, tkey storetypes.StoreKey) TestContext {
|
||||
func DefaultContextWithDB(t *testing.T, key, tkey storetypes.StoreKey) TestContext {
|
||||
db := dbm.NewMemDB()
|
||||
cms := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics())
|
||||
cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, db)
|
||||
|
||||
@@ -196,7 +196,7 @@ func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalance
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeFile(name string, dir string, contents []byte) error {
|
||||
func writeFile(name, dir string, contents []byte) error {
|
||||
file := filepath.Join(dir, name)
|
||||
|
||||
if err := os.MkdirAll(dir, 0o755); err != nil {
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ func GetRequest(url string) ([]byte, error) {
|
||||
|
||||
// PostRequest defines a wrapper around an HTTP POST request with a provided URL and data.
|
||||
// An error is returned if the request or reading the body fails.
|
||||
func PostRequest(url string, contentType string, data []byte) ([]byte, error) {
|
||||
func PostRequest(url, contentType string, data []byte) ([]byte, error) {
|
||||
res, err := http.Post(url, contentType, bytes.NewBuffer(data)) //nolint:gosec
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error while sending post request: %w", err)
|
||||
|
||||
@@ -100,7 +100,7 @@ func CreateRandomAccounts(accNum int) []sdk.AccAddress {
|
||||
return testAddrs
|
||||
}
|
||||
|
||||
func TestAddr(addr string, bech string) (sdk.AccAddress, error) {
|
||||
func TestAddr(addr, bech string) (sdk.AccAddress, error) {
|
||||
res, err := sdk.AccAddressFromHexUnsafe(addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -131,7 +131,7 @@ func GetSimulationLog(storeName string, sdr simtypes.StoreDecoderRegistry, kvAs,
|
||||
|
||||
// DiffKVStores compares two KVstores and returns all the key/value pairs
|
||||
// that differ from one another. It also skips value comparison for a set of provided prefixes.
|
||||
func DiffKVStores(a storetypes.KVStore, b storetypes.KVStore, prefixesToSkip [][]byte) (kvAs, kvBs []kv.Pair) {
|
||||
func DiffKVStores(a, b storetypes.KVStore, prefixesToSkip [][]byte) (kvAs, kvBs []kv.Pair) {
|
||||
iterA := a.Iterator(nil, nil)
|
||||
|
||||
defer iterA.Close()
|
||||
|
||||
Reference in New Issue
Block a user