1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

So much to configure, this is an ugly hack

This commit is contained in:
Asim 2016-01-02 22:52:59 +00:00
parent 6bf0affc75
commit 3df078ce4e

View File

@ -6,6 +6,7 @@ import (
"syscall" "syscall"
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/context" "github.com/micro/go-micro/context"
"github.com/micro/go-micro/server" "github.com/micro/go-micro/server"
) )
@ -40,7 +41,13 @@ func (s *service) Init(opts ...Option) {
s.opts.Cmd = options.Cmd s.opts.Cmd = options.Cmd
// Initialise the command flags, overriding new service // Initialise the command flags, overriding new service
s.opts.Cmd.Init() s.opts.Cmd.Init(
cmd.Broker(&s.opts.Broker),
cmd.Registry(&s.opts.Registry),
cmd.Transport(&s.opts.Transport),
cmd.Client(&s.opts.Client),
cmd.Server(&s.opts.Server),
)
// Update any options to override command flags // Update any options to override command flags
for _, o := range opts { for _, o := range opts {