Skip to content

Commit

Permalink
chore(executors): use do method instead of direct function call
Browse files Browse the repository at this point in the history
Signed-off-by: lvlcn-t <[email protected]>
  • Loading branch information
lvlcn-t committed Nov 18, 2024
1 parent f60389e commit e03bfb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executors/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Concurrent(effectors ...Effector) Effector {
errs := make(chan error, len(effectors))
for _, effector := range effectors {
g.Go(func() error {
err := effector(ctx)
err := effector.Do(ctx)
errs <- err
return err
})
Expand Down Expand Up @@ -111,7 +111,7 @@ func Sequential(effectors ...Effector) Effector {
return func(ctx context.Context) error {
var errs []error
for _, effector := range effectors {
errs = append(errs, effector(ctx))
errs = append(errs, effector.Do(ctx))
}
return errors.Join(errs...)
}
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lvlcn-t/go-kit/rest v0.1.0/go.mod h1:hqT1WJUsS/o90NGa9gMryDdlmafbp0W6VYb6eR3U05Q=
github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk=
Expand Down

0 comments on commit e03bfb0

Please sign in to comment.