generated from dogmatiq/template-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwaitgroup.gen.go
93 lines (83 loc) · 2.29 KB
/
waitgroup.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Code generated by Imbue's build process. DO NOT EDIT.
package imbue
import "context"
// Go1 starts a new goroutine by calling a function with a single dependency.
func Go1[D any](
g *WaitGroup,
fn func(context.Context, D) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke1(g.ctx, g.con, fn, options...)
})
}
// Go2 starts a new goroutine by calling a function with 2 dependencies.
func Go2[D1, D2 any](
g *WaitGroup,
fn func(context.Context, D1, D2) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke2(g.ctx, g.con, fn, options...)
})
}
// Go3 starts a new goroutine by calling a function with 3 dependencies.
func Go3[D1, D2, D3 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke3(g.ctx, g.con, fn, options...)
})
}
// Go4 starts a new goroutine by calling a function with 4 dependencies.
func Go4[D1, D2, D3, D4 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3, D4) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke4(g.ctx, g.con, fn, options...)
})
}
// Go5 starts a new goroutine by calling a function with 5 dependencies.
func Go5[D1, D2, D3, D4, D5 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3, D4, D5) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke5(g.ctx, g.con, fn, options...)
})
}
// Go6 starts a new goroutine by calling a function with 6 dependencies.
func Go6[D1, D2, D3, D4, D5, D6 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3, D4, D5, D6) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke6(g.ctx, g.con, fn, options...)
})
}
// Go7 starts a new goroutine by calling a function with 7 dependencies.
func Go7[D1, D2, D3, D4, D5, D6, D7 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3, D4, D5, D6, D7) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke7(g.ctx, g.con, fn, options...)
})
}
// Go8 starts a new goroutine by calling a function with 8 dependencies.
func Go8[D1, D2, D3, D4, D5, D6, D7, D8 any](
g *WaitGroup,
fn func(context.Context, D1, D2, D3, D4, D5, D6, D7, D8) error,
options ...InvokeOption,
) {
g.group.Go(func() error {
return Invoke8(g.ctx, g.con, fn, options...)
})
}