Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverGitRepos ¶
DiscoverGitRepos 发现指定目录下的所有Git仓库
func GetGitUserName ¶
GetGitUserName 获取Git用户名
func NormalizePath ¶
NormalizePath expands a leading tilde and returns an absolute path.
Types ¶
type CommitInfo ¶
type CommitInfo struct {
Hash string
Author string
Date time.Time
Message string
Branches []string // 分支信息
ChangedFiles []string
RepoPath string // 仓库路径,标识提交来自哪个仓库
}
CommitInfo 表示一个Git提交的信息
func GetCommitDetails ¶
func GetCommitDetails(hash string, opts *Options) (*CommitInfo, error)
GetCommitDetails 获取指定提交的详细信息
func GetCommitsBetween ¶
func GetCommitsBetween(fromDate, toDate time.Time, opts *Options) ([]CommitInfo, error)
GetCommitsBetween 获取指定时间范围内的所有提交
func GetCommitsThisWeek ¶
func GetCommitsThisWeek(opts *Options) ([]CommitInfo, error)
GetCommitsThisWeek 获取本周的所有提交
type Options ¶
Options Git操作的选项
func NewGitOptionsWithLanguage ¶
NewGitOptionsWithLanguage 创建带语言信息的Git选项
Click to show internal directories.
Click to hide internal directories.