shorgru/cmd/shorg/main.go

35 lines
496 B
Go
Raw Permalink Normal View History

2024-10-06 17:04:37 +03:00
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
2024-10-07 01:06:55 +03:00
"sh.org.ru/cmd/shorg/migrator"
"sh.org.ru/cmd/shorg/serve"
2024-10-06 17:04:37 +03:00
)
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",
},
},
},
2024-10-07 01:06:55 +03:00
migrator.Migrator(),
2024-10-06 17:04:37 +03:00
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}