diff options
author | Matthew Halpern <matthalp@google.com> | 2019-02-18 19:31:22 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-02-18 19:31:22 +0800 |
commit | 7b3e3d549ed3af9abad6251b9bf17c526ee444ba (patch) | |
tree | a1cd63373b03b3c5bec7442da9351d66163a0523 /node | |
parent | 3930f3795b6e46ce9104cf1bbfd2bdd4f2e605b3 (diff) | |
download | go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar.gz go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar.bz2 go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar.lz go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar.xz go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.tar.zst go-tangerine-7b3e3d549ed3af9abad6251b9bf17c526ee444ba.zip |
node: prefer nil slices over zero-length slices (#19083)
Diffstat (limited to 'node')
-rw-r--r-- | node/config.go | 2 | ||||
-rw-r--r-- | node/node.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/node/config.go b/node/config.go index ff0725aab..2f871e478 100644 --- a/node/config.go +++ b/node/config.go @@ -466,7 +466,7 @@ func makeAccountManager(conf *Config) (*accounts.Manager, string, error) { return nil, "", err } // Assemble the account manager and supported backends - backends := []accounts.Backend{} + var backends []accounts.Backend if len(conf.ExternalSigner) > 0 { log.Info("Using external signer", "url", conf.ExternalSigner) if extapi, err := external.NewExternalBackend(conf.ExternalSigner); err == nil { diff --git a/node/node.go b/node/node.go index f267cdc46..9227bf6bb 100644 --- a/node/node.go +++ b/node/node.go @@ -220,7 +220,7 @@ func (n *Node) Start() error { return convertFileLockError(err) } // Start each of the services - started := []reflect.Type{} + var started []reflect.Type for kind, service := range services { // Start the next service, stopping all previous upon failure if err := service.Start(running); err != nil { |