git-lfs/commands/command_version.go

26 lines
467 B
Go
Raw Normal View History

package commands
2013-09-23 01:08:31 +00:00
import (
"github.com/git-lfs/git-lfs/v3/lfshttp"
"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) {
Print(lfshttp.UserAgent)
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() {
RegisterCommand("version", versionCommand, func(cmd *cobra.Command) {
cmd.PreRun = nil
cmd.Flags().BoolVarP(&lovesComics, "comics", "c", false, "easter egg")
})
2013-09-23 01:08:31 +00:00
}