Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antandros/go-dpkg
The dpkg package is a Go library designed to list software installed on Debian distributions using dpkg
https://github.com/antandros/go-dpkg
debian dpkg go golang ubuntu
Last synced: 19 days ago
JSON representation
The dpkg package is a Go library designed to list software installed on Debian distributions using dpkg
- Host: GitHub
- URL: https://github.com/antandros/go-dpkg
- Owner: antandros
- License: agpl-3.0
- Created: 2023-08-10T15:14:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-11T02:28:31.000Z (about 1 year ago)
- Last Synced: 2024-10-09T05:58:22.121Z (29 days ago)
- Topics: debian, dpkg, go, golang, ubuntu
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dpkg Go Package
## Overview
The `dpkg` package is a Go library designed to list software installed on Debian distributions using `dpkg`. The package provides functionality to parse package details and represent them in structured Go data types.
## Data Structures
### Package
Contains detailed information about a Debian package. Key fields include:
- `PackageName`: Name of the package.
- `Status`, `Priority`, `Section`, and more: Various details about the package.
- `Maintainer`, `OriginalMaintainer`: Contact information of the package maintainers.
- `Extra`: A map that can hold any additional information about the package not covered by the other fields.### PackageContact
Represents the contact information of a package. It can be either an email address or a website.
- `Name`: The name of the contact.
- `Contact`: The actual contact information - email or website.
- `Type`: Specifies if the contact is an "email" or "website".## Usage
```
package mainimport (
"encoding/json"
"fmt""gitlab.com/antandros/go-dpkg"
)func main() {
packages, err := dpkg.GetPackages()
fmt.Println(err)
resp, err := json.MarshalIndent(packages, "", "\t")
fmt.Println(err)
fmt.Println(string(resp))
}
```## License
Refer to the `LICENSE` file in the repository.
## Contributing
Contributions are welcome! Please submit a pull request or open an issue on the project's repository.