Documentation ¶
Overview ¶
Package git contains implementations of Git objects that are useful to compute the version.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct { // Hash of the commit object. Hash Hash // Author is the original author of the commit. Author Signature // Committer is the one performing the commit. // It might be different from Author. Committer Signature // Message is the commit message, contains arbitrary text. Message string }
Commit data
type Hash ¶
type Hash string
Hash of commit
type Signature ¶
type Signature struct { // Name represents a person name. It is an arbitrary string. Name string // Email is an email, but it cannot be assumed to be well-formed. Email string // When is the timestamp of the signature. When time.Time }
Signature is used to identify who and when created a commit or tag.
func (Signature) GoString ¶ added in v0.2.0
GoString makes Signature satisfy the GoStringer interface.
Example ¶
s := &Signature{Name: "Arnaud Deprez", Email: "arnaudeprez@gmail.com", When: time.Date(2019, time.August, 12, 22, 47, 0, 0, time.UTC)} fmt.Printf("%#v\n", s)
Output: git.Signature{Name: "Arnaud Deprez", Email: "arnaudeprez@gmail.com", When: "2019-08-12 22:47:00 +0000 UTC"}
Click to show internal directories.
Click to hide internal directories.