git-lfs/commands/command_version.go
rubyist 4b103e645e Update user agent string
Example: git-media/0.2.2 (darwin; git 1.9.1; go 1.3)
2014-09-15 17:52:38 -04:00

30 lines
526 B
Go

package commands
import (
"github.com/github/git-media/gitmedia"
"github.com/spf13/cobra"
)
var (
lovesComics bool
versionCmd = &cobra.Command{
Use: "version",
Short: "Show the version number",
Run: versionCommand,
}
)
func versionCommand(cmd *cobra.Command, args []string) {
Print(gitmedia.UserAgent)
if lovesComics {
Print("Nothing may see Gah Lak Tus and survive!")
}
}
func init() {
versionCmd.Flags().BoolVarP(&lovesComics, "comics", "c", false, "easter egg")
RootCmd.AddCommand(versionCmd)
}