mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-12 18:42:48 +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 := sync.WaitGroup{}
|
||||||
wg.Add(len(p.Config.Host))
|
wg.Add(len(p.Config.Host))
|
||||||
errChannel := make(chan error, 1)
|
errChannel := make(chan error)
|
||||||
finished := make(chan bool, 1)
|
finished := make(chan struct{})
|
||||||
for _, host := range p.Config.Host {
|
for _, host := range p.Config.Host {
|
||||||
if p.Config.Sync {
|
if p.Config.Sync {
|
||||||
p.exec(host, &wg, errChannel)
|
p.exec(host, &wg, errChannel)
|
||||||
|
Loading…
Reference in New Issue
Block a user