Skip to content

Commit

Permalink
Merge pull request #205 from CosmWasm/go_vet
Browse files Browse the repository at this point in the history
Polish for go vet
  • Loading branch information
alpe authored Jul 20, 2020
2 parents 774f6d7 + d9143bc commit 46e0189
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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

0 comments on commit 46e0189

Please sign in to comment.