Cleanup, and fix decoding of TypedParams.

This commit is contained in:
Geoff Hickey
2017-11-14 18:59:55 -05:00
parent deb7a54ff8
commit a3bd42a5b1
7 changed files with 1459 additions and 887 deletions

View File

@@ -23,11 +23,14 @@ import (
)
// TODO: make these an argument
const lvPath = "../../../libvirt"
const protoPath = "src/remote/remote_protocol.x"
func main() {
fmt.Println("Generating golang bindings for libvirt")
lvPath := os.Getenv("LIBVIRT_SOURCE")
if lvPath == "" {
fmt.Println("set $LIBVIRT_SOURCE to point to the root of the libvirt sources and retry")
os.Exit(1)
}
lvFile := path.Join(lvPath, protoPath)
rdr, err := os.Open(lvFile)
if err != nil {