postgresql
This commit is contained in:
30
cmd/cli/main.go
Normal file
30
cmd/cli/main.go
Normal file
@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
godotenv.Load(".env")
|
||||
}
|
||||
|
||||
var commands = make([]*cli.Command, 0)
|
||||
|
||||
func main() {
|
||||
s := &cli.App{
|
||||
Name: "ricapi",
|
||||
Commands: commands,
|
||||
Before: func(c *cli.Context) error {
|
||||
godotenv.Load(".env")
|
||||
return nil
|
||||
},
|
||||
}
|
||||
err := s.Run(os.Args)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user