Shift embedded nats to the default

This commit is contained in:
Asim Aslam
2020-01-19 00:55:01 +00:00
parent 105596a0e5
commit 11b104677a
11 changed files with 1265 additions and 823 deletions

View File

@@ -76,6 +76,11 @@ func (s *service) Init(opts ...Option) {
}
}
// set cmd name
if len(s.opts.Cmd.App().Name) == 0 {
s.opts.Cmd.App().Name = s.Server().Options().Name
}
// Initialise the command flags, overriding new service
_ = s.opts.Cmd.Init(
cmd.Broker(&s.opts.Broker),