git-lfs/commands/command_version.go
Preben Ingvaldsen d101bdb605 lfsapi: extract new lfshttp package
Extract more basic http-related functionality out of lfsapi and
into a new package, lfshttp. Everything is currently functional
aside from authorization.
2018-09-11 14:51:29 -07:00

26 lines
464 B
Go

package commands
import (
"github.com/git-lfs/git-lfs/lfshttp"
"github.com/spf13/cobra"
)
var (
lovesComics bool
)
func versionCommand(cmd *cobra.Command, args []string) {
Print(lfshttp.UserAgent)
if lovesComics {
Print("Nothing may see Gah Lak Tus and survive!")
}
}
func init() {
RegisterCommand("version", versionCommand, func(cmd *cobra.Command) {
cmd.PreRun = nil
cmd.Flags().BoolVarP(&lovesComics, "comics", "c", false, "easter egg")
})
}