format with gofumpt (#18184)

* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
This commit is contained in:
6543 2022-01-20 18:46:10 +01:00 committed by GitHub
parent 1d98d205f5
commit 54e9ee37a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
423 changed files with 1585 additions and 1758 deletions

View file

@ -52,9 +52,7 @@ func newWechatworkMarkdownPayload(title string) *WechatworkPayload {
}
}
var (
_ PayloadConvertor = &WechatworkPayload{}
)
var _ PayloadConvertor = &WechatworkPayload{}
// Create implements PayloadConvertor Create method
func (f *WechatworkPayload) Create(p *api.CreatePayload) (api.Payloader, error) {
@ -72,12 +70,10 @@ func (f *WechatworkPayload) Delete(p *api.DeletePayload) (api.Payloader, error)
title := fmt.Sprintf("[%s] %s %s deleted", p.Repo.FullName, p.RefType, refName)
return newWechatworkMarkdownPayload(title), nil
}
// Fork implements PayloadConvertor Fork method
func (f *WechatworkPayload) Fork(p *api.ForkPayload) (api.Payloader, error) {
title := fmt.Sprintf("%s is forked to %s", p.Forkee.FullName, p.Repo.FullName)
return newWechatworkMarkdownPayload(title), nil
@ -110,7 +106,6 @@ func (f *WechatworkPayload) Push(p *api.PushPayload) (api.Payloader, error) {
}
}
return newWechatworkMarkdownPayload(title + "\r\n\r\n" + text), nil
}
// Issue implements PayloadConvertor Issue method
@ -120,7 +115,6 @@ func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) {
content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\"> %s</font> \n [%s](%s)", text, attachmentText, issueTitle, p.Issue.HTMLURL, p.Issue.HTMLURL)
return newWechatworkMarkdownPayload(content), nil
}
// IssueComment implements PayloadConvertor IssueComment method
@ -130,7 +124,6 @@ func (f *WechatworkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloa
content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\">%s</font> \n [%s](%s)", text, p.Comment.Body, issueTitle, p.Comment.HTMLURL, p.Comment.HTMLURL)
return newWechatworkMarkdownPayload(content), nil
}
// PullRequest implements PayloadConvertor PullRequest method
@ -140,7 +133,6 @@ func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloade
text, issueTitle, attachmentText)
return newWechatworkMarkdownPayload(pr), nil
}
// Review implements PayloadConvertor Review method
@ -157,7 +149,6 @@ func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_mode
}
return newWechatworkMarkdownPayload("# " + title + "\r\n\r\n >" + text), nil
}
// Repository implements PayloadConvertor Repository method