From f5a1b928ce0905512166d253484ae8da62a3aacf Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 3 Mar 2020 17:22:15 +0300 Subject: [PATCH] pkg: fix gofmt issues --- pkg/consensus/consensus.go | 2 +- pkg/rpc/request/param.go | 2 +- pkg/smartcontract/param_context.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index c3fe279e7..d5abb4501 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -446,7 +446,7 @@ func (s *service) getVerifiedTx(count int) []block.Transaction { pk := s.dbft.Pub.(*publicKey) sh = pk.GetScriptHash() } - txOuts = []transaction.Output{transaction.Output{ + txOuts = []transaction.Output{{ AssetID: core.UtilityTokenID(), Amount: netFee, ScriptHash: sh, diff --git a/pkg/rpc/request/param.go b/pkg/rpc/request/param.go index b3883ecdb..66e054842 100644 --- a/pkg/rpc/request/param.go +++ b/pkg/rpc/request/param.go @@ -26,7 +26,7 @@ type ( // invokefunction RPC method. FuncParam struct { Type smartcontract.ParamType `json:"type"` - Value Param `json:"value"` + Value Param `json:"value"` } ) diff --git a/pkg/smartcontract/param_context.go b/pkg/smartcontract/param_context.go index c80d67d19..147e00c9f 100644 --- a/pkg/smartcontract/param_context.go +++ b/pkg/smartcontract/param_context.go @@ -60,7 +60,7 @@ type rawKeyValuePair struct { func (p *Parameter) MarshalJSON() ([]byte, error) { var ( resultRawValue json.RawMessage - resultErr error + resultErr error ) switch p.Type { case BoolType, IntegerType, StringType, Hash256Type, Hash160Type: @@ -369,4 +369,4 @@ func NewParameterFromString(in string) (*Parameter, error) { return nil, err } return res, nil -} \ No newline at end of file +}