Skip to content

Commit d4984b4

Browse files
committed
Use the available context
1 parent 027e978 commit d4984b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/fanout/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import (
1414

1515
func main() {
1616
getRepo := dispatch.Func("getRepo", func(ctx context.Context, name string) (*dispatchhttp.Response, error) {
17-
return dispatchhttp.Get(context.Background(), "https://api.github.com/repos/dispatchrun/"+name)
17+
return dispatchhttp.Get(ctx, "https://api.github.com/repos/dispatchrun/"+name)
1818
})
1919

2020
getStargazers := dispatch.Func("getStargazers", func(ctx context.Context, url string) (*dispatchhttp.Response, error) {
21-
return dispatchhttp.Get(context.Background(), url)
21+
return dispatchhttp.Get(ctx, url)
2222
})
2323

2424
reduceStargazers := dispatch.Func("reduceStargazers", func(ctx context.Context, stargazerURLs []string) ([]string, error) {

0 commit comments

Comments
 (0)