forked from mroth/scmpuff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
41 lines (32 loc) · 1.02 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"fmt"
"github.com/mroth/scmpuff/commands/expand"
"github.com/mroth/scmpuff/commands/inits"
"github.com/mroth/scmpuff/commands/status"
"github.com/mroth/scmpuff/vendor/_nuts/github.com/spf13/cobra"
)
var NAME = "scmpuff"
var VERSION = "0.?.? (not using buildscript)" // overriden via build scripts
var puffCmd = &cobra.Command{
Use: "scmpuff",
Short: "scmpuff extends common git commands with numeric filename shortcuts.",
Long: `scmpuff extends common git commands with numeric filename shortcuts.
If you are just getting started, try the intro!`,
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Prints the version number",
Long: `All software has versions. This is ours.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(NAME, VERSION)
},
}
func main() {
puffCmd.AddCommand(introCmd)
puffCmd.AddCommand(versionCmd)
puffCmd.AddCommand(inits.CommandInit())
puffCmd.AddCommand(expand.CommandExpand())
puffCmd.AddCommand(status.CommandStatus())
puffCmd.Execute()
}