Don't create new options
This commit is contained in:
parent
742b83cbb1
commit
33b1cea29d
10
service.go
10
service.go
@ -68,17 +68,11 @@ func (s *service) Init(opts ...Option) {
|
||||
// close init
|
||||
close(s.init)
|
||||
|
||||
// We might get more command flags or the action here
|
||||
// This is pretty ugly, find a better way
|
||||
options := newOptions()
|
||||
options.Cmd = s.opts.Cmd
|
||||
|
||||
// process options
|
||||
for _, o := range opts {
|
||||
o(&options)
|
||||
o(&s.opts)
|
||||
}
|
||||
|
||||
s.opts.Cmd = options.Cmd
|
||||
|
||||
// Initialise the command flags, overriding new service
|
||||
s.opts.Cmd.Init(
|
||||
cmd.Broker(&s.opts.Broker),
|
||||
|
Loading…
Reference in New Issue
Block a user