mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-04 18:23:59 +08:00
chore: switch finished to struct{} for zero allocate (#96)
This commit is contained in:
@@ -237,8 +237,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 {
|
||||||
go func(host string) {
|
go func(host string) {
|
||||||
// Create MakeConfig instance with remote username, server address and path to private key.
|
// Create MakeConfig instance with remote username, server address and path to private key.
|
||||||
|
|||||||
Reference in New Issue
Block a user