mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
bump to go 1.23 (#31855)
This commit is contained in:
3
modules/cache/context.go
vendored
3
modules/cache/context.go
vendored
@@ -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(),
|
||||
})
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user