1
0
Fork 0
forked from forgejo/forgejo

Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239)

The images used by Gitea's drone pipeline were upgraded to Go 1.19.x
It causes the lint fails because Go 1.19 uses new code format.

This PR partially backport #20758 (including the emoji-data sync),
partially fix the format manually.
This commit is contained in:
wxiaoguang 2022-09-22 21:58:31 +08:00 committed by GitHub
parent 937ef6fa90
commit 20c135cd46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 629 additions and 581 deletions

View file

@ -68,8 +68,7 @@ func NewParser(r io.Reader, format Format) *Parser {
//
// It could, for example return something like:
//
// { "objecttype": "tag", "refname:short": "v1.16.4", "object": "f460b7543ed500e49c133c2cd85c8c55ee9dbe27" }
//
// { "objecttype": "tag", "refname:short": "v1.16.4", "object": "f460b7543ed500e49c133c2cd85c8c55ee9dbe27" }
func (p *Parser) Next() map[string]string {
if !p.scanner.Scan() {
return nil
@ -89,8 +88,7 @@ func (p *Parser) Err() error {
// parseRef parses out all key-value pairs from a single reference block, such as
//
// "objecttype tag\0refname:short v1.16.4\0object f460b7543ed500e49c133c2cd85c8c55ee9dbe27"
//
// "objecttype tag\0refname:short v1.16.4\0object f460b7543ed500e49c133c2cd85c8c55ee9dbe27"
func (p *Parser) parseRef(refBlock string) (map[string]string, error) {
if refBlock == "" {
// must be at EOF