mirror of
https://github.com/minio/minio.git
synced 2025-01-27 06:33:18 -05:00
Simplifying code
This commit is contained in:
parent
b921c5b459
commit
3c1580fcd9
@ -10,8 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Start() {
|
func Start() {
|
||||||
ctrlChans := make([]chan<- string, 0)
|
var ctrlChans []chan<- string
|
||||||
statusChans := make([]<-chan error, 0)
|
var statusChans []<-chan error
|
||||||
|
|
||||||
ctrlChan, statusChan, storage := storageModule.Start()
|
ctrlChan, statusChan, storage := storageModule.Start()
|
||||||
ctrlChans = append(ctrlChans, ctrlChan)
|
ctrlChans = append(ctrlChans, ctrlChan)
|
||||||
@ -30,7 +30,7 @@ func Start() {
|
|||||||
log.Println(chosen, value.Interface(), recvOk)
|
log.Println(chosen, value.Interface(), recvOk)
|
||||||
} else {
|
} else {
|
||||||
// Channel closed, remove from list
|
// Channel closed, remove from list
|
||||||
aliveStatusChans := make([]<-chan error, 0)
|
var aliveStatusChans []<-chan error
|
||||||
for i, ch := range statusChans {
|
for i, ch := range statusChans {
|
||||||
if i != chosen {
|
if i != chosen {
|
||||||
aliveStatusChans = append(aliveStatusChans, ch)
|
aliveStatusChans = append(aliveStatusChans, ch)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user