-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add id attributes to GitInfo, File, and Resources methods
- Loading branch information
Showing
4 changed files
with
67 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,62 +43,69 @@ This is configurable. See [details]. | |
|
||
## Methods | ||
|
||
AbbreviatedHash | ||
: (`string`) The abbreviated commit hash. | ||
###### AbbreviatedHash | ||
|
||
(`string`) The abbreviated commit hash. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .AbbreviatedHash }} → aab9ec0b3 | ||
{{ end }} | ||
``` | ||
|
||
AuthorDate | ||
: (`time.Time`) The author date. | ||
###### AuthorDate | ||
|
||
(`time.Time`) The author date. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .AuthorDate.Format "2006-01-02" }} → 2023-10-09 | ||
{{ end }} | ||
``` | ||
|
||
CommitDate | ||
: (`time.Time`) The commit date. | ||
###### AuthorEmail | ||
|
||
(`string`) The author's email address, respecting [gitmailmap]. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .CommitDate.Format "2006-01-02" }} → 2023-10-09 | ||
{{ .AuthorEmail }} → [email protected] | ||
{{ end }} | ||
``` | ||
|
||
AuthorEmail | ||
: (`string`) The author's email address, respecting [gitmailmap]. | ||
###### AuthorName | ||
|
||
(`string`) The author's name, respecting [gitmailmap]. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .AuthorEmail }} → [email protected] | ||
{{ .AuthorName }} → John Smith | ||
{{ end }} | ||
``` | ||
|
||
AuthorName | ||
: (`string`) The author's name, respecting [gitmailmap]. | ||
###### CommitDate | ||
|
||
(`time.Time`) The commit date. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .AuthorName }} → John Smith | ||
{{ .CommitDate.Format "2006-01-02" }} → 2023-10-09 | ||
{{ end }} | ||
``` | ||
|
||
Hash | ||
: (`string`) The commit hash. | ||
###### Hash | ||
|
||
(`string`) The commit hash. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
{{ .Hash }} → aab9ec0b31ebac916a1468c4c9c305f2bebf78d4 | ||
{{ end }} | ||
``` | ||
|
||
Subject | ||
: (`string`) The commit message subject. | ||
###### Subject | ||
|
||
(`string`) The commit message subject. | ||
|
||
```go-html-template | ||
{{ with .GitInfo }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters