codestyle: declare empty slice
https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices
This commit is contained in:
parent
3560ada669
commit
1afdb895a1
2 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ func TestBinBlockDecodeEncode(t *testing.T) {
|
|||
"908a398dd65dfd2aad6c06090c5a71d5e5280746577a6ddd5a1f2c1453f71ead": false,
|
||||
}
|
||||
|
||||
hashes := []string{}
|
||||
var hashes []string
|
||||
|
||||
for _, tx := range b.Transactions {
|
||||
switch tx.Type {
|
||||
|
|
|
@ -67,7 +67,7 @@ func makeStackItem(v interface{}) StackItem {
|
|||
case StackItem:
|
||||
return val
|
||||
case []int:
|
||||
a := []StackItem{}
|
||||
var a []StackItem
|
||||
for _, i := range val {
|
||||
a = append(a, makeStackItem(i))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue