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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user