mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-15 08:41:16 -05:00
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.6 to 2.2.7. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.6...v2.2.7) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-version: 2.2.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
19 lines
359 B
Go
19 lines
359 B
Go
// Package syncs provides synchronization primitives util functions.
|
|
package syncs
|
|
|
|
import "sync"
|
|
|
|
// WaitGroup is a wrapper of sync.WaitGroup.
|
|
type WaitGroup struct {
|
|
sync.WaitGroup
|
|
}
|
|
|
|
// Go runs the given function in a new goroutine. will auto call Add and Done.
|
|
func (wg *WaitGroup) Go(fn func()) {
|
|
wg.Add(1)
|
|
go func() {
|
|
defer wg.Done()
|
|
fn()
|
|
}()
|
|
}
|