Exemplo n.º 1
0
Arquivo: pbs.go Projeto: jbarber/pbs
func Pbs_strerror(errno int) string {
	// char* from pbs_strerror is statically allocated, so can't be freed
	return C.GoString(C.pbs_strerror(C.int(errno)))
}
Exemplo n.º 2
0
// GetLastError return last error.
func GetLastError() error {
	en := C.pbs_errno
	estr := C.pbs_strerror(en) // static string
	return errors.New(C.GoString(estr))
}