mirror of
https://github.com/golang/go
synced 2024-11-27 05:21:22 -07:00
cmd/go: fix fmt.Errorf call sites (latent bug)
Change-Id: I4ff42113c5dda553d6f3d58f0e4836dce7c84710 Reviewed-on: https://go-review.googlesource.com/10730 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
ea92f42cc8
commit
09a3a092af
@ -57,23 +57,23 @@ func readnote(filename, name string, typ int32) ([]byte, error) {
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
return nil, fmt.Errorf("read namesize failed:", err)
|
||||
return nil, fmt.Errorf("read namesize failed: %v", err)
|
||||
}
|
||||
err = binary.Read(r, f.ByteOrder, &descsize)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read descsize failed:", err)
|
||||
return nil, fmt.Errorf("read descsize failed: %v", err)
|
||||
}
|
||||
err = binary.Read(r, f.ByteOrder, ¬eType)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read type failed:", err)
|
||||
return nil, fmt.Errorf("read type failed: %v", err)
|
||||
}
|
||||
noteName, err := readwithpad(r, namesize)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read name failed:", err)
|
||||
return nil, fmt.Errorf("read name failed: %v", err)
|
||||
}
|
||||
desc, err := readwithpad(r, descsize)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read desc failed:", err)
|
||||
return nil, fmt.Errorf("read desc failed: %v", err)
|
||||
}
|
||||
if name == string(noteName) && typ == noteType {
|
||||
return desc, nil
|
||||
|
Loading…
Reference in New Issue
Block a user