Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NoteNameSpace is the gtm git note namespace NoteNameSpace = "gtm-data" // GTMDir is the subdir for gtm within the git repo root directory GTMDir = ".gtm" )
Variables ¶
View Source
var ( // ErrNotInitialized is raised when a git repo not initialized for time tracking ErrNotInitialized = errors.New("Git Time Metric is not initialized") // ErrFileNotFound is raised when record an event for a file that does not exist ErrFileNotFound = errors.New("File does not exist") )
View Source
var ( // GitHooks is map of hooks to apply to the git repo GitHooks = map[string]scm.GitHook{ "post-commit": { Exe: "gtm", Command: "gtm commit --yes", RE: regexp.MustCompile(`(?s)[/:a-zA-Z0-9$_=()"\.\|\-\\ ]*gtm(.exe"|)\s+commit\s+--yes\.*`)}, } // GitConfig is map of git configuration settings GitConfig = map[string]string{ "alias.pushgtm": "push origin refs/notes/gtm-data", "alias.fetchgtm": "fetch origin refs/notes/gtm-data:refs/notes/gtm-data", "notes.rewriteref": "refs/notes/gtm-data"} // GitIgnore is file ignore to apply to git repo GitIgnore = "/.gtm/" )
Functions ¶
func Clean ¶
Clean removes any event or metrics files from project in the current working directory
func Initialize ¶
Initialize initializes a git repo for time tracking
func LoadTags ¶ added in v1.2.4
LoadTags returns the tags for the project in the gtmPath directory
func Paths ¶
Paths returns the root git repo and gtm paths
Types ¶
type Index ¶ added in v1.2.0
Index contains list of projects and their locations
Source Files
¶
- index.go
- project.go
Click to show internal directories.
Click to hide internal directories.