process opts on multiple init calls
This commit is contained in:
parent
b43985401a
commit
d7dc4e618b
@ -60,6 +60,10 @@ func (s *service) Init(opts ...Option) {
|
||||
// so we can call cmd.Init once.
|
||||
select {
|
||||
case <-s.init:
|
||||
// only process options
|
||||
for _, o := range opts {
|
||||
o(&s.opts)
|
||||
}
|
||||
default:
|
||||
// close init
|
||||
close(s.init)
|
||||
|
Loading…
Reference in New Issue
Block a user