32 lines
511 B
Go
32 lines
511 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/urfave/cli/v2"
|
||
|
"go.jolheiser.com/beaver"
|
||
|
"go.jolheiser.com/vanity/cmd"
|
||
|
"go.jolheiser.com/vanity/modules/config"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
// config loads on init
|
||
|
|
||
|
app := cli.NewApp()
|
||
|
app.Name = "vanity"
|
||
|
app.Usage = "Vanity Go Imports"
|
||
|
app.Version = config.Version
|
||
|
app.Commands = []*cli.Command{
|
||
|
&cmd.Add,
|
||
|
&cmd.Remove,
|
||
|
&cmd.List,
|
||
|
&cmd.Config,
|
||
|
&cmd.Server,
|
||
|
}
|
||
|
app.EnableBashCompletion = true
|
||
|
err := app.Run(os.Args)
|
||
|
if err != nil {
|
||
|
beaver.Error(err)
|
||
|
}
|
||
|
}
|