mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
releaser: Fix golint issues
struct field HtmlURL should be HTMLURL
This commit is contained in:
parent
600047ff1c
commit
ccd3285484
3 changed files with 9 additions and 9 deletions
|
@ -167,8 +167,8 @@ type countribCount struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c countribCount) AuthorLink() string {
|
func (c countribCount) AuthorLink() string {
|
||||||
if c.GitHubAuthor.HtmlURL != "" {
|
if c.GitHubAuthor.HTMLURL != "" {
|
||||||
return fmt.Sprintf("[@%s](%s)", c.GitHubAuthor.Login, c.GitHubAuthor.HtmlURL)
|
return fmt.Sprintf("[@%s](%s)", c.GitHubAuthor.Login, c.GitHubAuthor.HTMLURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.Contains(c.Author, "@") {
|
if !strings.Contains(c.Author, "@") {
|
||||||
|
|
|
@ -31,13 +31,13 @@ func newGitHubAPI(repo string) *gitHubAPI {
|
||||||
|
|
||||||
type gitHubCommit struct {
|
type gitHubCommit struct {
|
||||||
Author gitHubAuthor `json:"author"`
|
Author gitHubAuthor `json:"author"`
|
||||||
HtmlURL string `json:"html_url"`
|
HTMLURL string `json:"html_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type gitHubAuthor struct {
|
type gitHubAuthor struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Login string `json:"login"`
|
Login string `json:"login"`
|
||||||
HtmlURL string `json:"html_url"`
|
HTMLURL string `json:"html_url"`
|
||||||
AvatarURL string `json:"avatar_url"`
|
AvatarURL string `json:"avatar_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ type gitHubRepo struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
HtmlURL string `json:"html_url"`
|
HTMLURL string `json:"html_url"`
|
||||||
Stars int `json:"stargazers_count"`
|
Stars int `json:"stargazers_count"`
|
||||||
Contributors []gitHubContributor
|
Contributors []gitHubContributor
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ type gitHubRepo struct {
|
||||||
type gitHubContributor struct {
|
type gitHubContributor struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Login string `json:"login"`
|
Login string `json:"login"`
|
||||||
HtmlURL string `json:"html_url"`
|
HTMLURL string `json:"html_url"`
|
||||||
Contributions int `json:"contributions"`
|
Contributions int `json:"contributions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,16 +125,16 @@ var templateFuncs = template.FuncMap{
|
||||||
return fmt.Sprintf(issueLinkTemplate, id, id)
|
return fmt.Sprintf(issueLinkTemplate, id, id)
|
||||||
},
|
},
|
||||||
"commitURL": func(info gitInfo) string {
|
"commitURL": func(info gitInfo) string {
|
||||||
if info.GitHubCommit.HtmlURL == "" {
|
if info.GitHubCommit.HTMLURL == "" {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return fmt.Sprintf(linkTemplate, info.Hash, info.GitHubCommit.HtmlURL)
|
return fmt.Sprintf(linkTemplate, info.Hash, info.GitHubCommit.HTMLURL)
|
||||||
},
|
},
|
||||||
"authorURL": func(info gitInfo) string {
|
"authorURL": func(info gitInfo) string {
|
||||||
if info.GitHubCommit.Author.Login == "" {
|
if info.GitHubCommit.Author.Login == "" {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return fmt.Sprintf(linkTemplate, "@"+info.GitHubCommit.Author.Login, info.GitHubCommit.Author.HtmlURL)
|
return fmt.Sprintf(linkTemplate, "@"+info.GitHubCommit.Author.Login, info.GitHubCommit.Author.HTMLURL)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue