Update golang packages to v1.23 (v7.0/forgejo) (minor) (#7081)

- Bump golangci-lint and fixes new linting issues.
- Bump golang.org/x/crypto.
- Bump deadcode package
- Bump govulncheck.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7081
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
Renovate Bot 2025-03-04 22:15:29 +00:00 committed by Gusted
commit 70ccec328d
53 changed files with 389 additions and 381 deletions

View file

@ -1058,7 +1058,7 @@ func readFileName(rd *strings.Reader) (string, bool) {
char, _ := rd.ReadByte()
_ = rd.UnreadByte()
if char == '"' {
fmt.Fscanf(rd, "%q ", &name)
_, _ = fmt.Fscanf(rd, "%q ", &name)
if len(name) == 0 {
log.Error("Reader has no file name: reader=%+v", rd)
return "", true
@ -1070,12 +1070,12 @@ func readFileName(rd *strings.Reader) (string, bool) {
} else {
// This technique is potentially ambiguous it may not be possible to uniquely identify the filenames from the diff line alone
ambiguity = true
fmt.Fscanf(rd, "%s ", &name)
_, _ = fmt.Fscanf(rd, "%s ", &name)
char, _ := rd.ReadByte()
_ = rd.UnreadByte()
for !(char == 0 || char == '"' || char == 'b') {
var suffix string
fmt.Fscanf(rd, "%s ", &suffix)
_, _ = fmt.Fscanf(rd, "%s ", &suffix)
name += " " + suffix
char, _ = rd.ReadByte()
_ = rd.UnreadByte()