Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish for go vet #205

Merged
merged 1 commit into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/benchmarks/txsize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func ExampleTxSendSize() {
if err != nil {
return
}
sigs := []auth.StdSignature{{nil, sig}}
sigs := []auth.StdSignature{{Signature: sig}}
tx := auth.NewStdTx([]sdk.Msg{msg1}, fee, sigs, "")
fmt.Println(len(cdc.MustMarshalBinaryBare([]sdk.Msg{msg1})))
fmt.Println(len(cdc.MustMarshalBinaryBare(tx)))
Expand Down
11 changes: 6 additions & 5 deletions x/wasm/internal/keeper/query_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
"encoding/json"

wasmTypes "github.com/CosmWasm/go-cosmwasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
Expand Down Expand Up @@ -102,12 +103,12 @@ func BankQuerier(bank bank.ViewKeeper) func(ctx sdk.Context, request *wasmTypes.
}
return json.Marshal(res)
}
return nil, wasmTypes.UnsupportedRequest{"unknown BankQuery variant"}
return nil, wasmTypes.UnsupportedRequest{Kind: "unknown BankQuery variant"}
}
}

func NoCustomQuerier(ctx sdk.Context, request json.RawMessage) ([]byte, error) {
return nil, wasmTypes.UnsupportedRequest{"custom"}
func NoCustomQuerier(sdk.Context, json.RawMessage) ([]byte, error) {
return nil, wasmTypes.UnsupportedRequest{Kind: "custom"}
}

func StakingQuerier(keeper staking.Keeper) func(ctx sdk.Context, request *wasmTypes.StakingQuery) ([]byte, error) {
Expand Down Expand Up @@ -171,7 +172,7 @@ func StakingQuerier(keeper staking.Keeper) func(ctx sdk.Context, request *wasmTy
}
return json.Marshal(res)
}
return nil, wasmTypes.UnsupportedRequest{"unknown Staking variant"}
return nil, wasmTypes.UnsupportedRequest{Kind: "unknown Staking variant"}
}
}

Expand Down Expand Up @@ -242,7 +243,7 @@ func WasmQuerier(wasm Keeper) func(ctx sdk.Context, request *wasmTypes.WasmQuery
// TODO: do we want to change the return value?
return json.Marshal(models)
}
return nil, wasmTypes.UnsupportedRequest{"unknown WasmQuery variant"}
return nil, wasmTypes.UnsupportedRequest{Kind: "unknown WasmQuery variant"}
}
}

Expand Down