Commit ef06b774 authored by Sebastian Stark's avatar Sebastian Stark

fix format string in debug messages

  - use %v for error values
parent 676d5851
...@@ -85,7 +85,7 @@ func createSnapshot(base *snapshot) (*snapshot, error) { ...@@ -85,7 +85,7 @@ func createSnapshot(base *snapshot) (*snapshot, error) {
} }
return nil, errors.New("rsync killed by request") return nil, errors.New("rsync killed by request")
case err := <-done: case err := <-done:
debugf("received something on done channel: ", err) debugf("received something on done channel: %v", err)
if err != nil { if err != nil {
// At this stage rsync ran, but with errors. // At this stage rsync ran, but with errors.
// Restart in case of // Restart in case of
...@@ -98,7 +98,7 @@ func createSnapshot(base *snapshot) (*snapshot, error) { ...@@ -98,7 +98,7 @@ func createSnapshot(base *snapshot) (*snapshot, error) {
// First, get the error code // First, get the error code
if exiterr, ok := err.(*exec.ExitError); ok { // The return code != 0) if exiterr, ok := err.(*exec.ExitError); ok { // The return code != 0)
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok { // Finally get the actual status code if status, ok := exiterr.Sys().(syscall.WaitStatus); ok { // Finally get the actual status code
debugf("The error code we got is: ", status.ExitStatus()) debugf("The error code we got is: %v", status.ExitStatus())
// status now holds the actual return code // status now holds the actual return code
// Magic number: means some files couldn't be // Magic number: means some files couldn't be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment