mirror of
https://github.com/golang/go
synced 2024-11-12 09:00:22 -07:00
all: fix some vet-found printf errors
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7393059
This commit is contained in:
parent
1a01ffd386
commit
707ab1347f
@ -338,7 +338,7 @@ func TestParsePAXTime(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if !ts.Equal(expected) {
|
if !ts.Equal(expected) {
|
||||||
t.Fatal("Time parsing failure %s %s", ts, expected)
|
t.Fatalf("Time parsing failure %s %s", ts, expected)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,7 +348,7 @@ func TestGobEncoderFieldsOfDifferentType(t *testing.T) {
|
|||||||
t.Fatal("decode error:", err)
|
t.Fatal("decode error:", err)
|
||||||
}
|
}
|
||||||
if y.G.s != "XYZ" {
|
if y.G.s != "XYZ" {
|
||||||
t.Fatalf("expected `XYZ` got %c", y.G.s)
|
t.Fatalf("expected `XYZ` got %q", y.G.s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1158,7 @@ type Time3339 time.Time
|
|||||||
|
|
||||||
func (t *Time3339) UnmarshalJSON(b []byte) error {
|
func (t *Time3339) UnmarshalJSON(b []byte) error {
|
||||||
if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' {
|
if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' {
|
||||||
return fmt.Errorf("types: failed to unmarshal non-string value %q as an RFC 3339 time")
|
return fmt.Errorf("types: failed to unmarshal non-string value %q as an RFC 3339 time", b)
|
||||||
}
|
}
|
||||||
tm, err := time.Parse(time.RFC3339, string(b[1:len(b)-1]))
|
tm, err := time.Parse(time.RFC3339, string(b[1:len(b)-1]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -262,7 +262,7 @@ func TestNewRequestContentLength(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if req.ContentLength != tt.want {
|
if req.ContentLength != tt.want {
|
||||||
t.Errorf("ContentLength(%#T) = %d; want %d", tt.r, req.ContentLength, tt.want)
|
t.Errorf("ContentLength(%T) = %d; want %d", tt.r, req.ContentLength, tt.want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user