Use []Type{} instead of make([]Type, 0).
This commit is contained in:
parent
9cfa95d269
commit
00403c7839
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ func cleanAndExpandPath(path string) string {
|
||||||
// removeDuplicateAddresses returns a new slice with all duplicate entries in
|
// removeDuplicateAddresses returns a new slice with all duplicate entries in
|
||||||
// addrs removed.
|
// addrs removed.
|
||||||
func removeDuplicateAddresses(addrs []string) []string {
|
func removeDuplicateAddresses(addrs []string) []string {
|
||||||
result := make([]string, 0)
|
result := []string{}
|
||||||
seen := map[string]bool{}
|
seen := map[string]bool{}
|
||||||
for _, val := range addrs {
|
for _, val := range addrs {
|
||||||
if _, ok := seen[val]; !ok {
|
if _, ok := seen[val]; !ok {
|
||||||
|
|
|
@ -958,7 +958,7 @@ func GetTransaction(icmd btcjson.Cmd) (interface{}, *btcjson.Error) {
|
||||||
Details: []btcjson.GetTransactionDetailsResult{},
|
Details: []btcjson.GetTransactionDetailsResult{},
|
||||||
WalletConflicts: []string{},
|
WalletConflicts: []string{},
|
||||||
}
|
}
|
||||||
details := make([]btcjson.GetTransactionDetailsResult, 0)
|
details := []btcjson.GetTransactionDetailsResult{}
|
||||||
for _, e := range accumulatedTxen {
|
for _, e := range accumulatedTxen {
|
||||||
switch record := e.Tx.(type) {
|
switch record := e.Tx.(type) {
|
||||||
case *tx.RecvTxOut:
|
case *tx.RecvTxOut:
|
||||||
|
|
Loading…
Reference in a new issue