[Libguestfs] golang binding help

Vasiliy Tolstov v.tolstov at selfip.ru
Mon Jul 14 11:52:29 UTC 2014


2014-07-14 15:30 GMT+04:00 Richard W.M. Jones <rjones at redhat.com>:
> <rant>
> I guess we can add this to the process.  It's a bit tedious that
> (again) golang defies conventional packaging.  In Fedora, golang
> causes no end of trouble because it prevents, dangerously IMO, ordinary
> distro packaging.
> </rant>
>

The main problem in current binding that it does not have source code,
only compile package file,
and if i simple want to rebould package without CGO (static linking)
or run local godoc to see docs i can't do that.


> What does the git repo look like?  Is there an example of one?
Nothing special - put all go files (*.go) to dir and push it to repo.
About docs - before each function in go file you need
// FuncName document string
where FuncName - function name, document string some docs about
function. Nothing special.
to compile with cgo you need on top of file something like:

// #cgo CFLAGS: -DXXXXX=1
// #cgo LDFLAGS: -lguestfs
// #include <libguestfs.h>
import "C"


-- 
Vasiliy Tolstov,
e-mail: v.tolstov at selfip.ru
jabber: vase at selfip.ru




More information about the Libguestfs mailing list