Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(n CommitNote) string
Marshal converts a commit note to a serialized string
Types ¶
type CommitNote ¶
type CommitNote struct {
Files []FileDetail
}
CommitNote contains the time metrics for a commit
func UnMarshal ¶
func UnMarshal(s string) (CommitNote, error)
UnMarshal unserializes a git note string into a commit note
func (CommitNote) FilterOutTerminal ¶ added in v1.2.0
func (n CommitNote) FilterOutTerminal() CommitNote
FilterOutTerminal filters out terminal time from commit note
func (CommitNote) Total ¶
func (n CommitNote) Total() int
Total returns the total time for a commit note
type FileByTime ¶
type FileByTime []FileDetail
FileByTime is list of FileDetails
func (FileByTime) Len ¶
func (a FileByTime) Len() int
func (FileByTime) Less ¶
func (a FileByTime) Less(i, j int) bool
func (FileByTime) Swap ¶
func (a FileByTime) Swap(i, j int)
type FileDetail ¶
FileDetail contains a source file's time metrics
func (*FileDetail) IsTerminal ¶ added in v1.1.0
func (f *FileDetail) IsTerminal() bool
IsTerminal returns true if file is terminal
func (*FileDetail) ShortenSourceFile ¶ added in v1.2.10
func (f *FileDetail) ShortenSourceFile(n int) string
ShortenSourceFile shortens source file to length n
func (*FileDetail) SortEpochs ¶
func (f *FileDetail) SortEpochs() []int64
SortEpochs returns timeline keys sorted by epoch
Click to show internal directories.
Click to hide internal directories.