chore: switch finished to struct{} for zero allocate (#140)

This commit is contained in:
Bo-Yi Wu 2019-03-30 08:03:16 +08:00 committed by GitHub
parent e7fd9e9b89
commit 29018dba3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,8 +152,8 @@ func (p Plugin) Exec() error {
wg := sync.WaitGroup{}
wg.Add(len(p.Config.Host))
errChannel := make(chan error, 1)
finished := make(chan bool, 1)
errChannel := make(chan error)
finished := make(chan struct{})
for _, host := range p.Config.Host {
if p.Config.Sync {
p.exec(host, &wg, errChannel)