示例#1
0
文件: pkg.go 项目: Zirak/pacman-fs
func pointerToPkg(pkgptr *C.alpm_pkg_t) *Pkg {
	return &Pkg{
		ptr: pkgptr,

		Name:        C.GoString(C.alpm_pkg_get_name(pkgptr)),
		Version:     C.GoString(C.alpm_pkg_get_version(pkgptr)),
		Description: C.GoString(C.alpm_pkg_get_desc(pkgptr)),
		InstallSize: int64(C.alpm_pkg_get_isize(pkgptr)),
	}
}
示例#2
0
func (pkg Package) Description() string {
	return C.GoString(C.alpm_pkg_get_desc(pkg.pmpkg))
}