mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
chore: switch finished to struct{} for zero allocate (#140)
This commit is contained in:
parent
e7fd9e9b89
commit
29018dba3a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user