mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 14:37:20 +00:00
Run gopls modernize
on codebase (#34751)
Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
This commit is contained in:
@ -251,7 +251,7 @@ func extractErrorLine(code []byte, lineNum, posNum int, target string) string {
|
||||
b := bufio.NewReader(bytes.NewReader(code))
|
||||
var line []byte
|
||||
var err error
|
||||
for i := 0; i < lineNum; i++ {
|
||||
for i := range lineNum {
|
||||
if line, err = b.ReadBytes('\n'); err != nil {
|
||||
if i == lineNum-1 && errors.Is(err, io.EOF) {
|
||||
err = nil
|
||||
|
Reference in New Issue
Block a user