diff --git a/byg.go b/byg.go index d13405c..9cfe4a2 100644 --- a/byg.go +++ b/byg.go @@ -2,6 +2,7 @@ package byg import ( "context" + "log" "sync" "golang.org/x/sync/errgroup" @@ -52,12 +53,15 @@ func (bb *Builder) Execute(ctx context.Context) error { defer bb.addmu.Unlock() for _, step := range bb.steps { + log.Printf("executing step: %s", step.name) errgroup, _ := errgroup.WithContext(ctx) for _, task := range step.tasks { - errgroup.Go(func() error { - return task(Context{}) - }) + func(task StepExecuteFunc) { + errgroup.Go(func() error { + return task(Context{}) + }) + }(task) } if err := errgroup.Wait(); err != nil {