summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Maiocchi <dmaiocchi@suse.com>2017-11-10 19:45:43 +0100
committerDario Maiocchi <dmaiocchi@suse.com>2017-11-16 11:26:28 +0100
commit5ea65823d419c7238d83acd2d7bc9cf85398bdef (patch)
treea6dee0752d87f7580cbcb88f66275fa7c45baac5
parent2e1a19e5d457d8dd75f20e9b6ca19bde9a628a8d (diff)
downloadterraform-provider-libvirt-5ea65823d419c7238d83acd2d7bc9cf85398bdef.tar
terraform-provider-libvirt-5ea65823d419c7238d83acd2d7bc9cf85398bdef.tar.gz
fix golint on stream and volume_def.go
-rw-r--r--libvirt/stream.go3
-rw-r--r--libvirt/volume_def.go4
2 files changed, 5 insertions, 2 deletions
diff --git a/libvirt/stream.go b/libvirt/stream.go
index fcfed2cf..e8d9b3e8 100644
--- a/libvirt/stream.go
+++ b/libvirt/stream.go
@@ -2,10 +2,12 @@ package libvirt
import libvirt "github.com/libvirt/libvirt-go"
+// StreamIO struct
type StreamIO struct {
Stream libvirt.Stream
}
+// NewStreamIO return libvirt StreamIO
func NewStreamIO(s libvirt.Stream) *StreamIO {
return &StreamIO{Stream: s}
}
@@ -18,6 +20,7 @@ func (sio *StreamIO) Write(p []byte) (int, error) {
return sio.Stream.Send(p)
}
+// Close StreamIO
func (sio *StreamIO) Close() error {
return sio.Stream.Finish()
}
diff --git a/libvirt/volume_def.go b/libvirt/volume_def.go
index f520a164..6119519e 100644
--- a/libvirt/volume_def.go
+++ b/libvirt/volume_def.go
@@ -40,11 +40,11 @@ func newDefVolumeFromLibvirt(volume *libvirt.StorageVol) (libvirtxml.StorageVolu
if err != nil {
return libvirtxml.StorageVolume{}, fmt.Errorf("could not get name for volume: %s", err)
}
- volumeDefXml, err := volume.GetXMLDesc(0)
+ volumeDefXML, err := volume.GetXMLDesc(0)
if err != nil {
return libvirtxml.StorageVolume{}, fmt.Errorf("could not get XML description for volume %s: %s", name, err)
}
- volumeDef, err := newDefVolumeFromXML(volumeDefXml)
+ volumeDef, err := newDefVolumeFromXML(volumeDefXML)
if err != nil {
return libvirtxml.StorageVolume{}, fmt.Errorf("could not get a volume definition from XML for %s: %s", volumeDef.Name, err)
}