Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antandros/go-rpminfo
The `go-rpminfo` package is a Go library designed to list software installed on GNU/Linux distros as using rpm
https://github.com/antandros/go-rpminfo
go golang rpm
Last synced: 6 days ago
JSON representation
The `go-rpminfo` package is a Go library designed to list software installed on GNU/Linux distros as using rpm
- Host: GitHub
- URL: https://github.com/antandros/go-rpminfo
- Owner: antandros
- Created: 2023-08-11T03:23:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-11T04:43:33.000Z (over 1 year ago)
- Last Synced: 2024-11-17T10:45:58.283Z (2 months ago)
- Topics: go, golang, rpm
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpminfo Go Package
## Overview
The `go-rpminfo` package is a Go library designed to list software installed on GNU/Linux distros as using rpm
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""github.com/antandros/go-rpminfo"
)func main() {
packages, err := rpminfo.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.