mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
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:
@@ -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)
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user