Skip to content

Commit

Permalink
Don't create new options
Browse files Browse the repository at this point in the history
  • Loading branch information
Asim Aslam committed Apr 17, 2017
1 parent 742b83c commit 33b1cea
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 33b1cea

Please sign in to comment.