cmd

package
v0.0.0-...-23ea0af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is version
	Version string
	// Revision is abbreviated revision
	Revision string
)
View Source
var RootCmd = &cobra.Command{
	Use:   "glstats",
	Short: "Show git log stats data",
	Long:  `Show git log stats data`,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetTimesUntil

func GetTimesUntil(until time.Time, num int, durationType DurationType) []time.Time

GetTimesUntil returns slice of time.Time. The slice of time.Time includes num time.Time and its duration is specified by durationType parameter.

Types

type DurationType

type DurationType int

DurationType is duration type used by summarying the git log data

const (
	// DAY is enum representing duration is day
	DAY DurationType = iota
	// MONTH is enum representing duration is month
	MONTH
	// YEAR is enum representing duration is year
	YEAR
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL