Commit 09a3a092 authored by Robert Griesemer's avatar Robert Griesemer

cmd/go: fix fmt.Errorf call sites (latent bug)

Change-Id: I4ff42113c5dda553d6f3d58f0e4836dce7c84710
Reviewed-on: https://go-review.googlesource.com/10730Reviewed-by: 's avatarRob Pike <r@golang.org>
parent ea92f42c
......@@ -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, &noteType)
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment