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) // 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) {

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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"
) )