summaryrefslogtreecommitdiffstats
path: root/modules/git/foreachref
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2022-08-30 21:15:45 -0500
committerGitHub <noreply@github.com>2022-08-30 21:15:45 -0500
commita48d6ba4b4be4207a2c78c36b095fb69938e5ae5 (patch)
tree6b77af95e14bb9216b6b5dca321a5804a63cfced /modules/git/foreachref
parent3edc14b687626f5ca1b4ecbe1d0d400b058f8dac (diff)
downloadgitea-a48d6ba4b4be4207a2c78c36b095fb69938e5ae5.tar.gz
gitea-a48d6ba4b4be4207a2c78c36b095fb69938e5ae5.zip
Go 1.19 format (#20758)
* 1.19 gofumpt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change CSV test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Commit whitespace fixes from @zeripath Co-authored-by: zeripath <art27@cantab.net> * Update emoji Signed-off-by: jolheiser <john.olheiser@gmail.com> * bump swagger & fix generate-swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'modules/git/foreachref')
-rw-r--r--modules/git/foreachref/parser.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/git/foreachref/parser.go b/modules/git/foreachref/parser.go
index eb8b77d903..bf83a10ed5 100644
--- a/modules/git/foreachref/parser.go
+++ b/modules/git/foreachref/parser.go
@@ -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