Skip to content

Commit 228b0d8

Browse files
authored
Expand comments
1 parent 53a5a02 commit 228b0d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ func (c *client) WaitForWorkflowInstance(ctx context.Context, instance *workflow
138138
}
139139
}
140140

141+
// GetWorkflowResult gets the workflow result for the given workflow result. It first waits for the workflow to finish or until
142+
// the given timeout has expired.
141143
func GetWorkflowResult[T any](ctx context.Context, c Client, instance *workflow.Instance, timeout time.Duration) (T, error) {
142144
if err := c.WaitForWorkflowInstance(ctx, instance, timeout); err != nil {
143145
return *new(T), fmt.Errorf("workflow did not finish in time: %w", err)

0 commit comments

Comments
 (0)