integration-cli: remove some redundant fmt.Sprintf()'s
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7e06add3c8
commit
abaf4b25d7
|
@ -74,7 +74,7 @@ func (d *Daemon) inspectFilter(name, filter string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Daemon) inspectFieldWithError(name, field string) (string, error) {
|
func (d *Daemon) inspectFieldWithError(name, field string) (string, error) {
|
||||||
return d.inspectFilter(name, fmt.Sprintf(".%s", field))
|
return d.inspectFilter(name, "."+field)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckActiveContainerCount returns the number of active containers
|
// CheckActiveContainerCount returns the number of active containers
|
||||||
|
|
|
@ -96,13 +96,13 @@ func inspectFilter(name, filter string) (string, error) {
|
||||||
|
|
||||||
// Deprecated: use cli.Inspect
|
// Deprecated: use cli.Inspect
|
||||||
func inspectFieldWithError(name, field string) (string, error) {
|
func inspectFieldWithError(name, field string) (string, error) {
|
||||||
return inspectFilter(name, fmt.Sprintf(".%s", field))
|
return inspectFilter(name, "."+field)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: use cli.Inspect
|
// Deprecated: use cli.Inspect
|
||||||
func inspectField(c *testing.T, name, field string) string {
|
func inspectField(c *testing.T, name, field string) string {
|
||||||
c.Helper()
|
c.Helper()
|
||||||
out, err := inspectFilter(name, fmt.Sprintf(".%s", field))
|
out, err := inspectFilter(name, "."+field)
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ func inspectField(c *testing.T, name, field string) string {
|
||||||
// Deprecated: use cli.Inspect
|
// Deprecated: use cli.Inspect
|
||||||
func inspectFieldJSON(c *testing.T, name, field string) string {
|
func inspectFieldJSON(c *testing.T, name, field string) string {
|
||||||
c.Helper()
|
c.Helper()
|
||||||
out, err := inspectFilter(name, fmt.Sprintf("json .%s", field))
|
out, err := inspectFilter(name, "json ."+field)
|
||||||
assert.NilError(c, err)
|
assert.NilError(c, err)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue