diff options
author | Flavio Castelli <fcastelli@suse.com> | 2017-06-19 21:08:34 +0200 |
---|---|---|
committer | Flavio Castelli <fcastelli@suse.com> | 2017-06-19 21:08:34 +0200 |
commit | 1b6657408ec4259426d7420fe48ae97415428f3c (patch) | |
tree | 8b085a06acca72dfe85c04461c639f6fa1e9b121 /libvirt/utils.go | |
parent | ca2af8cfa56a623912946875e1ee055e8fc3280b (diff) | |
download | terraform-provider-libvirt-1b6657408ec4259426d7420fe48ae97415428f3c.tar terraform-provider-libvirt-1b6657408ec4259426d7420fe48ae97415428f3c.tar.gz |
Fix: don't hide errors
Ensure encoding errors are propagated to the user.
Diffstat (limited to 'libvirt/utils.go')
-rw-r--r-- | libvirt/utils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt/utils.go b/libvirt/utils.go index 68c22ed0..0851fb8f 100644 --- a/libvirt/utils.go +++ b/libvirt/utils.go @@ -52,7 +52,7 @@ func xmlMarshallIndented(b interface{}) (string, error) { enc := xml.NewEncoder(buf) enc.Indent(" ", " ") if err := enc.Encode(b); err != nil { - fmt.Errorf("could not marshall this:\n%s", spew.Sdump(b)) + return "", fmt.Errorf("could not marshall this:\n%s", spew.Sdump(b)) } return buf.String(), nil } |