d101bdb605
Extract more basic http-related functionality out of lfsapi and into a new package, lfshttp. Everything is currently functional aside from authorization.
26 lines
464 B
Go
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")
|
|
})
|
|
}
|