Skip to content

Instantly share code, notes, and snippets.

@mattn
Created September 7, 2023 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/dea817dd2e587ed70c61fa4f4573d015 to your computer and use it in GitHub Desktop.
Save mattn/dea817dd2e587ed70c61fa4f4573d015 to your computer and use it in GitHub Desktop.
module Users/is/dev-env/go/project1
go 1.21.0
require golang.org/x/sync v0.3.0
package main
import (
"errors"
"time"
"golang.org/x/sync/errgroup"
)
func main() {
eg := new(errgroup.Group)
eg.Go(func() error {
time.Sleep(1 * time.Second)
return errors.New("error")
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment