blob: b9e467c1eece9947bde19daf49e9066013d4181b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
"neonxp.ru/go/framework/cmd/app/migrator"
"neonxp.ru/go/framework/cmd/app/serve"
)
func main() {
app := &cli.App{
Name: "app",
Commands: []*cli.Command{
{
Name: "serve",
Action: serve.Run,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Value: "./config/dev.yaml",
Usage: "config",
},
},
},
migrator.Migrator(),
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}
|