...
1 package bazel
2
3 import "context"
4
5
6 type Option func(*options)
7
8 type options struct {
9 ctx context.Context
10 configs []string
11 bin string
12 }
13
14
15
16
17 func WithCtx(ctx context.Context) Option {
18 return func(o *options) {
19 o.ctx = ctx
20 }
21 }
22
23
24
25 func WithConfigProfiles(cfgs ...string) Option {
26 return func(o *options) {
27 o.configs = append(o.configs, cfgs...)
28 }
29 }
30
31
32
33 func WithBinary(bin string) Option {
34 return func(o *options) {
35 o.bin = bin
36 }
37 }
38
View as plain text