Permalink
Browse files

Update docs to reflect marshal/unmarshal methods

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
  • Loading branch information...
berrange committed Jan 11, 2017
1 parent dc751c5 commit 1eb9439ab9276be68882cf76b9b6244f10eda4d2
Showing with 2 additions and 4 deletions.
  1. +2 −4 doc.go
View
6 doc.go
@@ -35,20 +35,18 @@
//
// import (
// "github.com/libvirt/libvirt-go-xml"
// "encoding/xml"
// )
//
// domcfg := &libvirtxml.Domain{Type: "kvm", Name: "demo",
// UUID: "8f99e332-06c4-463a-9099-330fb244e1b3",
// ....}
// xmldoc, err := xml.Marshal(domcfg)
// xmldoc, err := domcfg.Marshal()
//
// Example parsing a domainXML document, in combination with libvirt-go
//
// import (
// "github.com/libvirt/libvirt-go"
// "github.com/libvirt/libvirt-go-xml"
// "encoding/xml"
// "fmt"
// )
//
@@ -57,7 +55,7 @@
// xmldoc, err := dom.GetXMLDesc(0)
//
// domcfg := &libvirtxml.Domain{}
// err := xml.Unmarshal([]byte(xmldocC), domcfg)
// err := domcfg.Unmarshal(xmldoc)
//
// fmt.Printf("Virt type %s", domcfg.Type)
//

0 comments on commit 1eb9439

Please sign in to comment.