Ejemplo n.º 1
0
func (pkg Pkg) GetProvides() []*PkgDep {
	provides := []*PkgDep{}

	ugly := (*PointerList)(unsafe.Pointer(C.alpm_pkg_get_provides(pkg.ptr)))

	ugly.ForEach(func(provptr unsafe.Pointer) {
		dep := pointerToDep((*C.alpm_depend_t)(provptr))
		provides = append(provides, dep)
	})

	return provides
}
Ejemplo n.º 2
0
func (pkg Package) Provides() DependList {
	ptr := unsafe.Pointer(C.alpm_pkg_get_provides(pkg.pmpkg))
	return DependList{(*list)(ptr)}
}