diff options
author | techknowlogick <techknowlogick@gitea.com> | 2024-09-09 22:23:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 02:23:07 +0000 |
commit | d9a7748cdc3f13392acbde87edd18602b566c216 (patch) | |
tree | 0f7191740e0335ccf61f12bb94d40ea36b7b0ed7 /modules | |
parent | 1620e3f03bad1feb22c8e9c3c9baf4da04aaefe5 (diff) | |
download | gitea-d9a7748cdc3f13392acbde87edd18602b566c216.tar.gz gitea-d9a7748cdc3f13392acbde87edd18602b566c216.zip |
bump to go 1.23 (#31855)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cache/context.go | 3 | ||||
-rw-r--r-- | modules/git/log_name_status.go | 2 | ||||
-rw-r--r-- | modules/issue/template/template.go | 2 | ||||
-rw-r--r-- | modules/queue/base_channel.go | 2 | ||||
-rw-r--r-- | modules/storage/azureblob.go | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/modules/cache/context.go b/modules/cache/context.go index 5cca5afd6e..484cee659a 100644 --- a/modules/cache/context.go +++ b/modules/cache/context.go @@ -109,7 +109,8 @@ func WithCacheContext(ctx context.Context) context.Context { return ctx } } - return context.WithValue(ctx, cacheContextKey, &cacheContext{ + // FIXME: review the use of this nolint directive + return context.WithValue(ctx, cacheContextKey, &cacheContext{ //nolint:staticcheck data: make(map[any]map[any]any), created: timeNow(), }) diff --git a/modules/git/log_name_status.go b/modules/git/log_name_status.go index 9e345f3ee0..1fd58abfcd 100644 --- a/modules/git/log_name_status.go +++ b/modules/git/log_name_status.go @@ -114,7 +114,7 @@ type LogNameStatusCommitData struct { // Next returns the next LogStatusCommitData func (g *LogNameStatusRepoParser) Next(treepath string, paths2ids map[string]int, changed []bool, maxpathlen int) (*LogNameStatusCommitData, error) { var err error - if g.next == nil || len(g.next) == 0 { + if len(g.next) == 0 { g.buffull = false g.next, err = g.rd.ReadSlice('\x00') if err != nil { diff --git a/modules/issue/template/template.go b/modules/issue/template/template.go index 0a105c723c..a2b9d6b33e 100644 --- a/modules/issue/template/template.go +++ b/modules/issue/template/template.go @@ -401,7 +401,7 @@ func (f *valuedField) Render() string { } func (f *valuedField) Value() string { - return strings.TrimSpace(f.Get(fmt.Sprintf("form-field-" + f.ID))) + return strings.TrimSpace(f.Get(fmt.Sprintf("form-field-%s", f.ID))) } func (f *valuedField) Options() []*valuedOption { diff --git a/modules/queue/base_channel.go b/modules/queue/base_channel.go index d03c72bdae..dd8ccb15f4 100644 --- a/modules/queue/base_channel.go +++ b/modules/queue/base_channel.go @@ -120,7 +120,7 @@ func (q *baseChannel) RemoveAll(ctx context.Context) error { q.mu.Lock() defer q.mu.Unlock() - for q.c != nil && len(q.c) > 0 { + for len(q.c) > 0 { <-q.c } diff --git a/modules/storage/azureblob.go b/modules/storage/azureblob.go index 211522c5bb..568227ca47 100644 --- a/modules/storage/azureblob.go +++ b/modules/storage/azureblob.go @@ -114,7 +114,7 @@ func convertAzureBlobErr(err error) error { if !errors.As(err, &respErr) { return err } - return fmt.Errorf(respErr.ErrorCode) + return fmt.Errorf("%s", respErr.ErrorCode) } // NewAzureBlobStorage returns a azure blob storage |