1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Add the ability to switch out client/server

This commit is contained in:
Asim
2016-11-18 17:29:26 +00:00
parent f9709ffa6e
commit 20feb95e18
6 changed files with 60 additions and 9 deletions

View File

@ -48,12 +48,12 @@ func main() {
"type": "helloworld",
}),
// Setup some flags. Specify --client to run the client
// Setup some flags. Specify --run_client to run the client
// Add runtime flags
// We could do this below too
micro.Flags(cli.BoolFlag{
Name: "client",
Name: "run_client",
Usage: "Launch the client",
}),
)
@ -65,7 +65,7 @@ func main() {
// Add runtime action
// We could actually do this above
micro.Action(func(c *cli.Context) {
if c.Bool("client") {
if c.Bool("run_client") {
runClient(service)
os.Exit(0)
}