Merge PR #4908: Various goreport fixes

This commit is contained in:
colin axner 2019-08-15 06:54:10 -07:00 committed by Alexander Bezobchuk
parent 70ba07191d
commit 3eac2707b2
7 changed files with 5 additions and 8 deletions

View File

@ -99,8 +99,6 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error {
// run forever (the node will not be returned)
select {}
return nil
}
func startInProcess(ctx *Context, appCreator AppCreator) (*node.Node, error) {

View File

@ -189,7 +189,7 @@ func TestRedact(t *testing.T) {
func TestABCIInfoSerializeErr(t *testing.T) {
var (
// Create errors with stacktrace for equal comparision.
// Create errors with stacktrace for equal comparison.
myErrDecode = Wrap(ErrTxDecode, "test")
myErrAddr = Wrap(ErrInvalidAddress, "tester")
myPanic = ErrPanic

View File

@ -338,4 +338,4 @@ func (m *Manager) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo
ValidatorUpdates: validatorUpdates,
Events: ctx.EventManager().ABCIEvents(),
}
}
}

View File

@ -14,7 +14,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/gov/types"
)
func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) {
r.HandleFunc(fmt.Sprintf("/gov/parameters/{%s}", RestParamsType), queryParamsHandlerFn(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")
}
func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)

View File

@ -19,4 +19,4 @@ func TestEqualProposalID(t *testing.T) {
state2.StartingProposalID = 1
require.Equal(t, state1, state2)
require.True(t, state1.Equal(state2))
}
}

View File

@ -68,6 +68,7 @@ func (tr TallyResult) Equals(comp TallyResult) bool {
tr.No.Equal(comp.No) &&
tr.NoWithVeto.Equal(comp.NoWithVeto)
}
// String implements stringer interface
func (tr TallyResult) String() string {
return fmt.Sprintf(`Tally Result:

View File

@ -7,8 +7,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
"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"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramscutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"
)