123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package main
- import (
- "log"
- "os"
- "github.com/jsmartx/giter/cmd"
- "github.com/urfave/cli"
- )
- var version = "dev"
- func main() {
- app := cli.NewApp()
- app.Usage = "Git users manager"
- app.Version = version
- app.Commands = []cli.Command{
- {
- Name: "list",
- Aliases: []string{"ls"},
- Usage: "List all the git user config",
- Action: cmd.List,
- },
- {
- Name: "use",
- Usage: "Change git user config to username",
- Action: cmd.Use,
- },
- {
- Name: "show",
- Usage: "Show git user detail",
- Action: cmd.Show,
- },
- {
- Name: "add",
- Aliases: []string{"new"},
- Usage: "Add one custom user config",
- Action: cmd.Add,
- },
- {
- Name: "update",
- Usage: "Update one custom user config",
- Action: cmd.Update,
- },
- {
- Name: "del",
- Aliases: []string{"rm"},
- Usage: "Delete one custom user config",
- Action: cmd.Delete,
- },
- }
- err := app.Run(os.Args)
- if err != nil {
- log.Fatal(err)
- }
- }
|