diff --git a/service.go b/service.go index 1f49371e..4f3d0033 100644 --- a/service.go +++ b/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),