Skip to content

Commit

Permalink
More vet fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Jan 11, 2015
1 parent 724fce4 commit 295d63c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/influxd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func execRun(args []string) {
log.Println("failed to start UDP Graphite Server", err.Error())
}
} else {
log.Fatalf("unrecognized Graphite Server prototcol", c.Protocol)
log.Fatalf("unrecognized Graphite Server prototcol %s", c.Protocol)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions influxql/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ func TestParser_ParseStatement(t *testing.T) {
{
s: `CREATE USER testuser WITH PASSWORD pwd1337 WITH ALL PRIVILEGES`,
stmt: &influxql.CreateUserStatement{
Name: "testuser",
Password: "pwd1337",
Name: "testuser",
Password: "pwd1337",
Privilege: influxql.NewPrivilege(influxql.AllPrivileges),
},
},
Expand Down Expand Up @@ -840,7 +840,7 @@ func BenchmarkParserParseStatement(b *testing.B) {
if stmt, err := influxql.NewParser(strings.NewReader(s)).ParseStatement(); err != nil {
b.Fatalf("unexpected error: %s", err)
} else if stmt == nil {
b.Fatalf("expected statement", stmt)
b.Fatalf("expected statement: %s", stmt)
}
}
b.SetBytes(int64(len(s)))
Expand Down
2 changes: 1 addition & 1 deletion messaging/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestClient_ReplicaID(t *testing.T) {
c := NewClient(1000)
defer c.Close()
if replicaID := c.ReplicaID(); replicaID != 1000 {
t.Fatalf("unexpected replica id: %s", replicaID)
t.Fatalf("unexpected replica id: %d", replicaID)
}
}

Expand Down
2 changes: 1 addition & 1 deletion raft/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestHTTPTransport_Heartbeat_Err(t *testing.T) {
u, _ := url.Parse(s.URL)
_, _, err := raft.DefaultTransport.Heartbeat(u, 1, 2, 3)
if err == nil {
t.Errorf("%d. expected error")
t.Errorf("%d. expected error", i)
} else if tt.err != err.Error() {
t.Errorf("%d. error:\n\nexp: %s\n\ngot: %s", i, tt.err, err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func TestServer_Measurements(t *testing.T) {
}
ids := s.MeasurementSeriesIDs("foo", "foo")
if !ids.Equals(expectedSeriesIDs) {
t.Fatalf("Series IDs not the same:\n exp: %s\n got: %s", expectedSeriesIDs, ids)
t.Fatalf("Series IDs not the same:\n exp: %v\n got: %v", expectedSeriesIDs, ids)
}

s.Restart()
Expand All @@ -571,7 +571,7 @@ func TestServer_Measurements(t *testing.T) {
}
ids = s.MeasurementSeriesIDs("foo", "foo")
if !ids.Equals(expectedSeriesIDs) {
t.Fatalf("Series IDs not the same:\n exp: %s\n got: %s", expectedSeriesIDs, ids)
t.Fatalf("Series IDs not the same:\n exp: %v\n got: %v", expectedSeriesIDs, ids)
}
}

Expand Down

0 comments on commit 295d63c

Please sign in to comment.