Example #1
0
func (pkg Pkg) GetDeps() []*PkgDep {
	deps := []*PkgDep{}

	uglyDeps := (*PointerList)(unsafe.Pointer(C.alpm_pkg_get_depends(pkg.ptr)))

	uglyDeps.ForEach(func(depptr unsafe.Pointer) {
		dep := pointerToDep((*C.alpm_depend_t)(depptr))
		deps = append(deps, dep)
	})

	return deps
}
Example #2
0
func (pkg Package) Depends() DependList {
	ptr := unsafe.Pointer(C.alpm_pkg_get_depends(pkg.pmpkg))
	return DependList{(*list)(ptr)}
}