From 3c1580fcd9d4467791fe2c86d5d0d2ad1374570f Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Tue, 20 Jan 2015 14:07:39 -0800 Subject: [PATCH] Simplifying code --- pkg/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 0e886eb04..77dda7814 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -10,8 +10,8 @@ import ( ) func Start() { - ctrlChans := make([]chan<- string, 0) - statusChans := make([]<-chan error, 0) + var ctrlChans []chan<- string + var statusChans []<-chan error ctrlChan, statusChan, storage := storageModule.Start() ctrlChans = append(ctrlChans, ctrlChan) @@ -30,7 +30,7 @@ func Start() { log.Println(chosen, value.Interface(), recvOk) } else { // Channel closed, remove from list - aliveStatusChans := make([]<-chan error, 0) + var aliveStatusChans []<-chan error for i, ch := range statusChans { if i != chosen { aliveStatusChans = append(aliveStatusChans, ch)