mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-07 11:04:05 +09:00
update golangci-lint to v2.7.0 (#36079)
- Update and autofix most issues - Corrected variable names to `cutOk` - Impossible condition in `services/migrations/onedev_test.go` removed - `modules/setting/config_env.go:128:3` looks like a false-positive, added nolint
This commit is contained in:
@@ -77,8 +77,8 @@ func Code(fileName, language, code string) (output template.HTML, lexerName stri
|
||||
|
||||
if lexer == nil {
|
||||
// Attempt stripping off the '?'
|
||||
if idx := strings.IndexByte(language, '?'); idx > 0 {
|
||||
lexer = lexers.Get(language[:idx])
|
||||
if before, _, ok := strings.Cut(language, "?"); ok {
|
||||
lexer = lexers.Get(before)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user