Merge PR #4908: Various goreport fixes
This commit is contained in:
parent
70ba07191d
commit
3eac2707b2
|
@ -99,8 +99,6 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error {
|
||||||
|
|
||||||
// run forever (the node will not be returned)
|
// run forever (the node will not be returned)
|
||||||
select {}
|
select {}
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func startInProcess(ctx *Context, appCreator AppCreator) (*node.Node, error) {
|
func startInProcess(ctx *Context, appCreator AppCreator) (*node.Node, error) {
|
||||||
|
|
|
@ -189,7 +189,7 @@ func TestRedact(t *testing.T) {
|
||||||
|
|
||||||
func TestABCIInfoSerializeErr(t *testing.T) {
|
func TestABCIInfoSerializeErr(t *testing.T) {
|
||||||
var (
|
var (
|
||||||
// Create errors with stacktrace for equal comparision.
|
// Create errors with stacktrace for equal comparison.
|
||||||
myErrDecode = Wrap(ErrTxDecode, "test")
|
myErrDecode = Wrap(ErrTxDecode, "test")
|
||||||
myErrAddr = Wrap(ErrInvalidAddress, "tester")
|
myErrAddr = Wrap(ErrInvalidAddress, "tester")
|
||||||
myPanic = ErrPanic
|
myPanic = ErrPanic
|
||||||
|
|
|
@ -338,4 +338,4 @@ func (m *Manager) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo
|
||||||
ValidatorUpdates: validatorUpdates,
|
ValidatorUpdates: validatorUpdates,
|
||||||
Events: ctx.EventManager().ABCIEvents(),
|
Events: ctx.EventManager().ABCIEvents(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
||||||
r.HandleFunc(fmt.Sprintf("/gov/parameters/{%s}", RestParamsType), queryParamsHandlerFn(cliCtx)).Methods("GET")
|
r.HandleFunc(fmt.Sprintf("/gov/parameters/{%s}", RestParamsType), queryParamsHandlerFn(cliCtx)).Methods("GET")
|
||||||
r.HandleFunc("/gov/proposals", queryProposalsWithParameterFn(cliCtx)).Methods("GET")
|
r.HandleFunc("/gov/proposals", queryProposalsWithParameterFn(cliCtx)).Methods("GET")
|
||||||
|
@ -27,7 +26,6 @@ func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
||||||
r.HandleFunc(fmt.Sprintf("/gov/proposals/{%s}/votes/{%s}", RestProposalID, RestVoter), queryVoteHandlerFn(cliCtx)).Methods("GET")
|
r.HandleFunc(fmt.Sprintf("/gov/proposals/{%s}/votes/{%s}", RestProposalID, RestVoter), queryVoteHandlerFn(cliCtx)).Methods("GET")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
|
|
|
@ -19,4 +19,4 @@ func TestEqualProposalID(t *testing.T) {
|
||||||
state2.StartingProposalID = 1
|
state2.StartingProposalID = 1
|
||||||
require.Equal(t, state1, state2)
|
require.Equal(t, state1, state2)
|
||||||
require.True(t, state1.Equal(state2))
|
require.True(t, state1.Equal(state2))
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ func (tr TallyResult) Equals(comp TallyResult) bool {
|
||||||
tr.No.Equal(comp.No) &&
|
tr.No.Equal(comp.No) &&
|
||||||
tr.NoWithVeto.Equal(comp.NoWithVeto)
|
tr.NoWithVeto.Equal(comp.NoWithVeto)
|
||||||
}
|
}
|
||||||
|
|
||||||
// String implements stringer interface
|
// String implements stringer interface
|
||||||
func (tr TallyResult) String() string {
|
func (tr TallyResult) String() string {
|
||||||
return fmt.Sprintf(`Tally Result:
|
return fmt.Sprintf(`Tally Result:
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/client/utils"
|
"github.com/cosmos/cosmos-sdk/x/auth/client/utils"
|
||||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
|
||||||
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
|
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/params"
|
"github.com/cosmos/cosmos-sdk/x/params"
|
||||||
paramscutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"
|
paramscutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue