Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Commit ¶
type Commit struct { Hash string Author Signature Committer Signature Message string Parents []string }
Commit represents a Git commit.
func (Commit) Before ¶
Before determines if a given commit is chronologically before another commit.
func (Commit) Equal ¶
Equal determines if two commits are the same. Two commits are the same if they both have the same hash.
func (Commit) ShortMessage ¶
ShortMessage returns a one-line truncated commit message.
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git provides Git functionalities.
type Signature ¶
Signature determines who and when created a commit or tag.
func (Signature) After ¶
After determines if a given signature is chronologically after another signature.
type Tag ¶
type Tag struct { Type TagType Hash string Name string Tagger *Signature Message *string Commit Commit }
Tag represents a Git tag.
func (Tag) After ¶
After determines if a given tag is chronologically after another tag. Two tags are compared using the commits they refer to.
func (Tag) Before ¶
Before determines if a given tag is chronologically before another tag. Two tags are compared using the commits they refer to.
type Tags ¶
type Tags []Tag
Tags is a list of Git tags.
func (Tags) First ¶
First returns the first tag that satisifies the given predicate. If you pass a nil function, the first tag will be returned.
func (Tags) Last ¶
Last returns the last tag that satisifies the given predicate. If you pass a nil function, the last tag will be returned.