github.com/wawandco/oxpecker@v1.5.7-0.20210910201653-5958d4afdd89/tools/ox/templates/main.go.tmpl (about) 1 package main 2 3 import ( 4 "context" 5 "fmt" 6 "os" 7 8 "{{.Module}}" 9 _ "{{.Module}}/app/tasks" 10 _ "{{.Module}}/app/models" 11 12 "github.com/wawandco/oxpecker/cli" 13 "github.com/wawandco/oxpecker/tools/soda" 14 ) 15 16 // main function for the tooling cli, will be invoked by Oxpecker 17 // when found in the source code. In here you can add/remove plugins that 18 // your app will use as part of its lifecycle. 19 func main() { 20 cli.Use(soda.Plugins({{.Module}}.Migrations)...) 21 err := cli.Run(context.Background(), os.Args) 22 if err != nil { 23 fmt.Printf("[error] %v \n", err.Error()) 24 25 os.Exit(1) 26 } 27 }