From 9b561344fe8e986d4c7eff781ea1e1a072418468 Mon Sep 17 00:00:00 2001 From: rigel rozanski Date: Thu, 6 Jul 2017 05:39:58 -0400 Subject: [PATCH] addressing PR 154 comments --- cmd/basecli/commands/query.go | 2 +- docs/guide/counter/cmd/countercli/commands/counter.go | 6 +++--- docs/guide/counter/plugins/counter/counter.go | 4 ++-- modules/coin/handler.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/basecli/commands/query.go b/cmd/basecli/commands/query.go index d5728d05e..1bb05aef7 100644 --- a/cmd/basecli/commands/query.go +++ b/cmd/basecli/commands/query.go @@ -46,7 +46,7 @@ type BaseTxPresenter struct { } // ParseData - unmarshal raw bytes to a basecoin tx -func (b BaseTxPresenter) ParseData(raw []byte) (interface{}, error) { +func (BaseTxPresenter) ParseData(raw []byte) (interface{}, error) { var tx basecoin.Tx err := wire.ReadBinaryBytes(raw, &tx) return tx, err diff --git a/docs/guide/counter/cmd/countercli/commands/counter.go b/docs/guide/counter/cmd/countercli/commands/counter.go index 0bb39e6ab..81d95e4b4 100644 --- a/docs/guide/counter/cmd/countercli/commands/counter.go +++ b/docs/guide/counter/cmd/countercli/commands/counter.go @@ -21,7 +21,7 @@ var CounterTxCmd = &cobra.Command{ Long: `Add a vote to the counter. You must pass --valid for it to count and the countfee will be added to the counter.`, - RunE: doCounterTx, + RunE: counterTx, } // nolint - flags names @@ -38,9 +38,9 @@ func init() { fs.Int(FlagSequence, -1, "Sequence number for this transaction") } -// TODO: doCounterTx is very similar to the sendtx one, +// TODO: counterTx is very similar to the sendtx one, // maybe we can pull out some common patterns? -func doCounterTx(cmd *cobra.Command, args []string) error { +func counterTx(cmd *cobra.Command, args []string) error { // load data from json or flags var tx basecoin.Tx found, err := txcmd.LoadJSON(&tx) diff --git a/docs/guide/counter/plugins/counter/counter.go b/docs/guide/counter/plugins/counter/counter.go index 0aafca19b..7587b7a79 100644 --- a/docs/guide/counter/plugins/counter/counter.go +++ b/docs/guide/counter/plugins/counter/counter.go @@ -106,12 +106,12 @@ type Handler struct { var _ stack.Dispatchable = Handler{} // Name - return counter namespace -func (h Handler) Name() string { +func (Handler) Name() string { return NameCounter } // AssertDispatcher - placeholder to satisfy XXX -func (h Handler) AssertDispatcher() {} +func (Handler) AssertDispatcher() {} // CheckTx checks if the tx is properly structured func (h Handler) CheckTx(ctx basecoin.Context, store types.KVStore, tx basecoin.Tx, _ basecoin.Checker) (res basecoin.Result, err error) { diff --git a/modules/coin/handler.go b/modules/coin/handler.go index 9ed218a34..44526bc9f 100644 --- a/modules/coin/handler.go +++ b/modules/coin/handler.go @@ -30,7 +30,7 @@ func NewHandler() Handler { } // Name - return name space -func (h Handler) Name() string { +func (Handler) Name() string { return NameCoin }