mirror of
https://github.com/MontFerret/ferret.git
synced 2025-04-19 12:12:16 +02:00
22 lines
271 B
Go
22 lines
271 B
Go
package browser
|
|
|
|
import (
|
|
"golang.org/x/sync/errgroup"
|
|
)
|
|
|
|
func PointerInt(input int) *int {
|
|
return &input
|
|
}
|
|
|
|
type BatchFunc = func() error
|
|
|
|
func RunBatch(funcs ...BatchFunc) error {
|
|
eg := errgroup.Group{}
|
|
|
|
for _, f := range funcs {
|
|
eg.Go(f)
|
|
}
|
|
|
|
return eg.Wait()
|
|
}
|