Skip to content

Commit e8c639f

Browse files
committed
ifx
1 parent c4ea64e commit e8c639f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,29 @@ func main() {
109109
fmt.Println("Enqueuing workflows")
110110
handles := make([]dbos.WorkflowHandle[int], 10)
111111
for i := range 10 {
112-
handle, err := taskWf(ctx, i, dbos.WithQueue(queue.Name))
112+
handle, err := taskWf(context.Background(), i, dbos.WithQueue(queue.Name))
113113
if err != nil {
114-
return "", fmt.Errorf("failed to enqueue step %d: %w", i, err)
114+
panic(fmt.Sprintf("failed to enqueue step %d: %v", i, err))
115115
}
116116
handles[i] = handle
117117
}
118118
results := make([]int, 10)
119119
for i, handle := range handles {
120-
result, err := handle.GetResult(ctx)
120+
result, err := handle.GetResult(context.Background())
121121
if err != nil {
122-
return "", fmt.Errorf("failed to get result for step %d: %w", i, err)
122+
panic(fmt.Sprintf("failed to get result for step %d: %v", i, err))
123123
}
124124
results[i] = result
125125
}
126-
fmt.Printf("Successfully completed %d steps\n", len(results)), nil
126+
fmt.Printf("Successfully completed %d steps\n", len(results))
127127
}
128128
```
129-
</details>
129+
</details>
130+
131+
## Getting started
132+
133+
Install the DBOS Transact package in your program:
134+
135+
```shell
136+
github.com/dbos-inc/dbos-transact-go
137+
```

0 commit comments

Comments
 (0)