mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Remove serve subcommand
Former-commit-id: d043e461b53d8525268889380e6d307bf1e91ffe [formerly 7148459fedf6847393039077ed1b61c3ad65392f] [formerly f32e700c6e421f094b2c7047fc277050e66d3c70 [formerly 1f6e70028a87b587f42ddd6dd3a240d60cd1e46c [formerly375979fc19
]]] Former-commit-id: 690c8ae68f8f3f18dd5726d9f30557b251238c71 [formerly 07fe4a8721cd13e277cbb25cd743b1f8ff4c0e82] Former-commit-id: 2d0761bcb0e6f3b856fb962155b8292e92a231da Former-commit-id:15debdf177
This commit is contained in:
parent
c3ba228288
commit
c66c312fdb
23
main.go
23
main.go
@ -18,7 +18,13 @@ func main() {
|
|||||||
app.Version = version
|
app.Version = version
|
||||||
app.Compiled = time.Now()
|
app.Compiled = time.Now()
|
||||||
app.Action = func(c *cli.Context) error {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
@ -43,21 +49,6 @@ func main() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
app.Commands = []cli.Command{
|
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",
|
Name: "migrate",
|
||||||
Aliases: []string{"m"},
|
Aliases: []string{"m"},
|
||||||
|
Loading…
Reference in New Issue
Block a user