From a48d6ba4b4be4207a2c78c36b095fb69938e5ae5 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 30 Aug 2022 21:15:45 -0500 Subject: Go 1.19 format (#20758) * 1.19 gofumpt Signed-off-by: jolheiser * Change CSV test Signed-off-by: jolheiser * Commit whitespace fixes from @zeripath Co-authored-by: zeripath * Update emoji Signed-off-by: jolheiser * bump swagger & fix generate-swagger Signed-off-by: jolheiser Co-authored-by: zeripath Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH --- modules/git/foreachref/parser.go | 6 ++---- modules/git/signature_gogit.go | 6 ++++-- modules/git/signature_nogogit.go | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'modules/git') 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 diff --git a/modules/git/signature_gogit.go b/modules/git/signature_gogit.go index fe81cd97df..6f1c98420d 100644 --- a/modules/git/signature_gogit.go +++ b/modules/git/signature_gogit.go @@ -19,8 +19,10 @@ import ( type Signature = object.Signature // Helper to get a signature from the commit line, which looks like these: -// author Patrick Gundlach 1378823654 +0200 -// author Patrick Gundlach Thu, 07 Apr 2005 22:13:13 +0200 +// +// author Patrick Gundlach 1378823654 +0200 +// author Patrick Gundlach Thu, 07 Apr 2005 22:13:13 +0200 +// // but without the "author " at the beginning (this method should) // be used for author and committer. // diff --git a/modules/git/signature_nogogit.go b/modules/git/signature_nogogit.go index 2fc8dde04d..07a3b79f1e 100644 --- a/modules/git/signature_nogogit.go +++ b/modules/git/signature_nogogit.go @@ -37,8 +37,10 @@ func (s *Signature) Decode(b []byte) { } // Helper to get a signature from the commit line, which looks like these: -// author Patrick Gundlach 1378823654 +0200 -// author Patrick Gundlach Thu, 07 Apr 2005 22:13:13 +0200 +// +// author Patrick Gundlach 1378823654 +0200 +// author Patrick Gundlach Thu, 07 Apr 2005 22:13:13 +0200 +// // but without the "author " at the beginning (this method should) // be used for author and committer. func newSignatureFromCommitline(line []byte) (sig *Signature, err error) { -- cgit v1.2.3