github.com/2lambda123/git-lfs@v2.5.2+incompatible/commands/command_version.go (about)

     1  package commands
     2  
     3  import (
     4  	"github.com/git-lfs/git-lfs/lfsapi"
     5  	"github.com/spf13/cobra"
     6  )
     7  
     8  var (
     9  	lovesComics bool
    10  )
    11  
    12  func versionCommand(cmd *cobra.Command, args []string) {
    13  	Print(lfsapi.UserAgent)
    14  
    15  	if lovesComics {
    16  		Print("Nothing may see Gah Lak Tus and survive!")
    17  	}
    18  }
    19  
    20  func init() {
    21  	RegisterCommand("version", versionCommand, func(cmd *cobra.Command) {
    22  		cmd.PreRun = nil
    23  		cmd.Flags().BoolVarP(&lovesComics, "comics", "c", false, "easter egg")
    24  	})
    25  }