From 66c38105d2d6480aefeec784f0721531901d3f05 Mon Sep 17 00:00:00 2001 From: Matthew Halpern Date: Thu, 14 Feb 2019 13:53:27 -0800 Subject: [PATCH] mobile: prefer nil slices over zero-length slices --- mobile/p2p.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/p2p.go b/mobile/p2p.go index a80d9fff2e..14b4ffc0ba 100644 --- a/mobile/p2p.go +++ b/mobile/p2p.go @@ -37,7 +37,7 @@ func (ni *NodeInfo) GetDiscoveryPort() int { return ni.info.Ports.Discovery func (ni *NodeInfo) GetListenerPort() int { return ni.info.Ports.Listener } func (ni *NodeInfo) GetListenerAddress() string { return ni.info.ListenAddr } func (ni *NodeInfo) GetProtocols() *Strings { - protos := []string{} + var protos []string for proto := range ni.info.Protocols { protos = append(protos, proto) }