mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 09:21:13 -05:00
chore(lint): make golangci-lint to v1.59.0 happy
This commit is contained in:
parent
288075c724
commit
6d712590f1
1 changed files with 3 additions and 3 deletions
|
@ -1057,7 +1057,7 @@ func readFileName(rd *strings.Reader) (string, bool) {
|
||||||
char, _ := rd.ReadByte()
|
char, _ := rd.ReadByte()
|
||||||
_ = rd.UnreadByte()
|
_ = rd.UnreadByte()
|
||||||
if char == '"' {
|
if char == '"' {
|
||||||
fmt.Fscanf(rd, "%q ", &name)
|
_, _ = fmt.Fscanf(rd, "%q ", &name)
|
||||||
if len(name) == 0 {
|
if len(name) == 0 {
|
||||||
log.Error("Reader has no file name: reader=%+v", rd)
|
log.Error("Reader has no file name: reader=%+v", rd)
|
||||||
return "", true
|
return "", true
|
||||||
|
@ -1069,12 +1069,12 @@ func readFileName(rd *strings.Reader) (string, bool) {
|
||||||
} else {
|
} else {
|
||||||
// This technique is potentially ambiguous it may not be possible to uniquely identify the filenames from the diff line alone
|
// This technique is potentially ambiguous it may not be possible to uniquely identify the filenames from the diff line alone
|
||||||
ambiguity = true
|
ambiguity = true
|
||||||
fmt.Fscanf(rd, "%s ", &name)
|
_, _ = fmt.Fscanf(rd, "%s ", &name)
|
||||||
char, _ := rd.ReadByte()
|
char, _ := rd.ReadByte()
|
||||||
_ = rd.UnreadByte()
|
_ = rd.UnreadByte()
|
||||||
for !(char == 0 || char == '"' || char == 'b') {
|
for !(char == 0 || char == '"' || char == 'b') {
|
||||||
var suffix string
|
var suffix string
|
||||||
fmt.Fscanf(rd, "%s ", &suffix)
|
_, _ = fmt.Fscanf(rd, "%s ", &suffix)
|
||||||
name += " " + suffix
|
name += " " + suffix
|
||||||
char, _ = rd.ReadByte()
|
char, _ = rd.ReadByte()
|
||||||
_ = rd.UnreadByte()
|
_ = rd.UnreadByte()
|
||||||
|
|
Loading…
Reference in a new issue