mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-06 21:57:51 +09:00
Update golangci-lint to v2.11.4 (#37059)
Update golangci-lint from v2.11.2 to v2.11.4 and fix new `modernize` lint warnings: - Use `strings.Builder` instead of string concatenation in loop (`evaluator.go`) - Use `atomic.Int64` instead of `int64` with atomic free functions (`logchecker.go`, `timer_test.go`, `integration_test.go`) --- This PR was written with the help of Claude Opus 4.6 Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This commit is contained in:
@@ -53,11 +53,11 @@ func (lc *LogChecker) checkLogEvent(event *log.EventFormatted) {
|
||||
}
|
||||
}
|
||||
|
||||
var checkerIndex int64
|
||||
var checkerIndex atomic.Int64
|
||||
|
||||
func NewLogChecker(namePrefix string) (logChecker *LogChecker, cancel func()) {
|
||||
logger := log.GetManager().GetLogger(namePrefix)
|
||||
newCheckerIndex := atomic.AddInt64(&checkerIndex, 1)
|
||||
newCheckerIndex := checkerIndex.Add(1)
|
||||
writerName := namePrefix + "-" + strconv.FormatInt(newCheckerIndex, 10)
|
||||
|
||||
lc := &LogChecker{}
|
||||
|
||||
Reference in New Issue
Block a user