Skip to content

Commit 02f1dd3

Browse files
committed
Use any instead of interface{}
1 parent ed108fa commit 02f1dd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

workflow/activity.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
)
1717

1818
type ActivityOptions struct {
19+
// RetryOptions defines how to retry the activity in case of failure.
1920
RetryOptions RetryOptions
2021
}
2122

@@ -24,13 +25,13 @@ var DefaultActivityOptions = ActivityOptions{
2425
}
2526

2627
// ExecuteActivity schedules the given activity to be executed
27-
func ExecuteActivity[TResult any](ctx Context, options ActivityOptions, activity Activity, args ...interface{}) Future[TResult] {
28+
func ExecuteActivity[TResult any](ctx Context, options ActivityOptions, activity Activity, args ...any) Future[TResult] {
2829
return WithRetries(ctx, options.RetryOptions, func(ctx Context, attempt int) Future[TResult] {
2930
return executeActivity[TResult](ctx, options, attempt, activity, args...)
3031
})
3132
}
3233

33-
func executeActivity[TResult any](ctx Context, options ActivityOptions, attempt int, activity Activity, args ...interface{}) Future[TResult] {
34+
func executeActivity[TResult any](ctx Context, options ActivityOptions, attempt int, activity Activity, args ...any) Future[TResult] {
3435
f := sync.NewFuture[TResult]()
3536

3637
if ctx.Err() != nil {

0 commit comments

Comments
 (0)