gpm/main.go

36 lines
532 B
Go

package main
import (
"gitea.com/gpm/gpm/cmd"
"gitea.com/jolheiser/beaver"
"github.com/urfave/cli/v2"
"os"
)
var Version = "develop"
func main() {
// config loads on init
app := cli.NewApp()
app.Name = "gpm"
app.Usage = "Go Package Manager"
app.Version = Version
app.Commands = []*cli.Command{
&cmd.Add,
&cmd.Remove,
&cmd.List,
&cmd.Get,
&cmd.Import,
&cmd.Export,
&cmd.Config,
}
app.Flags = cmd.Flags
app.EnableBashCompletion = true
err := app.Run(os.Args)
if err != nil {
beaver.Error(err)
}
}