Most of the code already used %v.
}
if err != nil {
return nil, nil, fmt.Errorf(
- "%s failed: %s; stdout: %q, stderr: %q",
+ "%s failed: %v; stdout: %q, stderr: %q",
quoted, err, stdout.String(), stderr.String())
}
return stdout.Bytes(), stderr.Bytes(), nil
c.logger.Debug2f("%s: command output:\n%s", module, out)
}
if err != nil {
- return nil, fmt.Errorf("%s failed: %s; output: %q",
+ return nil, fmt.Errorf("%s failed: %v; output: %q",
quoted, err, out)
}
return out, nil
err := s.setDefaults()
if err != nil {
- s.resp.Error = fmt.Sprintf("%s", err)
+ s.resp.Error = fmt.Sprintf("%v", err)
return s.resp
}
err = s.syncFiles()
if err != nil {
- s.resp.Error = fmt.Sprintf("files: %s", err)
+ s.resp.Error = fmt.Sprintf("files: %v", err)
return s.resp
}
err = s.syncPackages()
if err != nil {
- s.resp.Error = fmt.Sprintf("packages: %s", err)
+ s.resp.Error = fmt.Sprintf("packages: %v", err)
return s.resp
}
err = s.syncServices()
if err != nil {
- s.resp.Error = fmt.Sprintf("services: %s", err)
+ s.resp.Error = fmt.Sprintf("services: %v", err)
return s.resp
}
err = s.syncCommands()
if err != nil {
- s.resp.Error = fmt.Sprintf("commands: %s", err)
+ s.resp.Error = fmt.Sprintf("commands: %v", err)
return s.resp
}
return s.resp
t.Helper()
// Ugly but the simplest way to compare errors (including nil)
- actStr := fmt.Sprintf("%s", act)
- expStr := fmt.Sprintf("%s", exp)
+ actStr := fmt.Sprintf("%v", act)
+ expStr := fmt.Sprintf("%v", exp)
if actStr != expStr {
t.Errorf("err = %s (%#v), want %s (%#v)",
actStr, act, expStr, exp)