note

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2016 License: MIT Imports: 7 Imported by: 0

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

func (n CommitNote) FilterOutTerminal() CommitNote

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

type FileDetail struct {
	SourceFile string
	TimeSpent  int
	Timeline   map[int64]int
	Status     string
}

FileDetail contains a source file's time metrics

func (*FileDetail) IsTerminal

func (f *FileDetail) IsTerminal() bool

func (*FileDetail) SortEpochs

func (f *FileDetail) SortEpochs() []int64

SortEpochs returns timeline keys sorted by epoch

Source Files

  • note.go

Jump to

Keyboard shortcuts

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