Fixing a lot of string formatting issues with regards to:

* Improper format specifier (e.g. %s for bools or %s for ints)
  * More or less parameters than format specifiers
  * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
This commit is contained in:
Kris Rousey
2015-03-31 15:32:02 -07:00
parent 903fb42a36
commit 6904c4d585
26 changed files with 66 additions and 66 deletions

View File

@@ -445,7 +445,7 @@ func (p *Parser) parse() ([]Requirement, error) {
case IdentifierToken:
r, err := p.parseRequirement()
if err != nil {
return nil, fmt.Errorf("unable to parse requiremnt: ", err)
return nil, fmt.Errorf("unable to parse requiremnt: %v", err)
}
requirements = append(requirements, *r)
t, l := p.consume(Values)

View File

@@ -322,7 +322,7 @@ func TestToString(t *testing.T) {
}
for _, ts := range toStringTests {
if out := ts.In.String(); out == "" && ts.Valid {
t.Errorf("%+v.String() => '%v' expected no error", ts.In)
t.Errorf("%+v.String() => '%v' expected no error", ts.In, out)
} else if out != ts.Out {
t.Errorf("%+v.String() => '%v' want '%v'", ts.In, out, ts.Out)
}