Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrGitNotFound = errors.New("git executable not found in $PATH")
)
Functions ¶
func FileExists ¶ added in v1.6.3
FileExists checks if a file exists.
Types ¶
type ContentGitInfo ¶ added in v1.6.3
func ReadJSONFile ¶ added in v1.6.3
func ReadJSONFile(filename string) (ContentGitInfo, error)
type GitInfo ¶
type GitInfo struct {
Hash string `json:"hash"` // Commit hash
AbbreviatedHash string `json:"abbreviatedHash"` // Abbreviated commit hash
Subject string `json:"subject"` // The commit message's subject/title line
AuthorName string `json:"authorName"` // The author name, respecting .mailmap
AuthorEmail string `json:"authorEmail"` // The author email address, respecting .mailmap
AuthorDate time.Time `json:"authorDate"` // The author date
CommitDate time.Time `json:"commitDate"` // The commit date
CreateDate time.Time `json:"createDate"` // The create date
FromGetJson *GitInfo
Body string `json:"body"` // The commit message body
}
GitInfo holds information about a Git commit.
type GitRepo ¶
type GitRepo struct {
// TopLevelAbsPath contains the absolute path of the top-level directory.
// This is similar to the answer from "git rev-parse --show-toplevel"
// except symbolic link is not followed on non-Windows platforms.
// Note that this follows Git's way of handling paths, so expect to get forward slashes,
// even on Windows.
TopLevelAbsPath string
// The files in this Git repository.
Files GitMap
}
Click to show internal directories.
Click to hide internal directories.