From 15debdf1773570fa99bfa411f4d3af6c12f9b237 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 22 Mar 2017 14:14:47 -0600 Subject: [PATCH] Remove serve subcommand Former-commit-id: d043e461b53d8525268889380e6d307bf1e91ffe [formerly 7148459fedf6847393039077ed1b61c3ad65392f] [formerly f32e700c6e421f094b2c7047fc277050e66d3c70 [formerly 375979fc194eabd559bd7babe527cac05d557204]] Former-commit-id: 690c8ae68f8f3f18dd5726d9f30557b251238c71 [formerly 07fe4a8721cd13e277cbb25cd743b1f8ff4c0e82] Former-commit-id: 2d0761bcb0e6f3b856fb962155b8292e92a231da --- main.go | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/main.go b/main.go index 30fa428..e7c47cc 100755 --- a/main.go +++ b/main.go @@ -18,7 +18,13 @@ func main() { app.Version = version app.Compiled = time.Now() app.Action = func(c *cli.Context) error { - cli.ShowSubcommandHelp(c) + if !c.GlobalBool("debug") { + turnOffDebugger() + } + pathToData = c.GlobalString("data") + os.MkdirAll(pathToData, 0755) + fmt.Printf("\nRunning CowYo at http://%s:%s\n\n", GetLocalIP(), c.GlobalString("port")) + serve(c.GlobalString("port")) return nil } app.Flags = []cli.Flag{ @@ -43,21 +49,6 @@ func main() { }, } app.Commands = []cli.Command{ - { - Name: "serve", - Aliases: []string{"s"}, - Usage: "start a cowyo server", - Action: func(c *cli.Context) error { - if !c.GlobalBool("debug") { - turnOffDebugger() - } - pathToData = c.GlobalString("data") - os.MkdirAll(pathToData, 0755) - fmt.Printf("\nRunning CowYo at http://%s:%s\n\n", GetLocalIP(), c.GlobalString("port")) - serve(c.GlobalString("port")) - return nil - }, - }, { Name: "migrate", Aliases: []string{"m"},