8000 GitHub - newmo-oss/gogroup: gogroup provides a group of goroutines used to run functions concurrently.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

newmo-oss/gogroup

Repository files navigation

gogroup Go ReferenceGo Report Card

gogroup provides a group of goroutines used to run functions concurrently.

Usage

var g gogroup.Group

g.Add(func(ctx context.Context) error {
	// do something
	return nil
})

g.Add(func(ctx context.Context) error {
	// convert panic as an error and cancel the context
	panic("panic")
})

if err := g.Run(ctx); err != nil {
	return err
}

gogroupcheck

gogroupcheck is an analyzer that reports any use of sync.WaitGroup, golang.org/x/sync/errgroup.Group,
github.com/sourcegraph/conc.WaitGroup, and github.com/sourcegraph/conc/pool (and its subpackages), keeping your codebase on a single, consistent concurrency library.

Install

go install github.com/newmo-oss/gogroupcheck/cmd/gogroupcheck@latest

Usage

go vet -vettool=$(which gogroupcheck) ./...

License

MIT

About

gogroup provides a group of goroutines used to run functions concurrently.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

0