2014-06-03 15:08:58 +00:00
|
|
|
package commands
|
2013-09-23 01:08:31 +00:00
|
|
|
|
|
|
|
import (
|
2016-11-15 17:01:18 +00:00
|
|
|
"github.com/git-lfs/git-lfs/httputil"
|
2016-05-23 18:02:27 +00:00
|
|
|
"github.com/spf13/cobra"
|
2013-09-23 01:08:31 +00:00
|
|
|
)
|
|
|
|
|
2014-06-26 20:05:23 +00:00
|
|
|
var (
|
|
|
|
lovesComics bool
|
|
|
|
)
|
2013-09-23 01:08:31 +00:00
|
|
|
|
2014-06-26 20:05:23 +00:00
|
|
|
func versionCommand(cmd *cobra.Command, args []string) {
|
2016-05-13 16:38:06 +00:00
|
|
|
Print(httputil.UserAgent)
|
2013-12-05 23:27:50 +00:00
|
|
|
|
2014-06-26 20:05:23 +00:00
|
|
|
if lovesComics {
|
|
|
|
Print("Nothing may see Gah Lak Tus and survive!")
|
2013-09-23 01:08:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2016-09-01 16:09:38 +00:00
|
|
|
RegisterCommand("version", versionCommand, func(cmd *cobra.Command) {
|
2016-09-01 14:46:26 +00:00
|
|
|
cmd.PreRun = nil
|
2016-08-10 15:33:25 +00:00
|
|
|
cmd.Flags().BoolVarP(&lovesComics, "comics", "c", false, "easter egg")
|
|
|
|
})
|
2013-09-23 01:08:31 +00:00
|
|
|
}
|