https://github.com/gopherlibs/winpkg
A Go (Golang) library for retrieving package versions from the Chocolatey API.
https://github.com/gopherlibs/winpkg
Last synced: 5 months ago
JSON representation
A Go (Golang) library for retrieving package versions from the Chocolatey API.
- Host: GitHub
- URL: https://github.com/gopherlibs/winpkg
- Owner: gopherlibs
- License: mit
- Created: 2022-08-28T03:22:45.000Z (almost 4 years ago)
- Default Branch: trunk
- Last Pushed: 2022-08-28T04:41:42.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T17:42:07.908Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# winpkg [](https://app.circleci.com/pipelines/github/gopherlibs/winpkg) [](https://goreportcard.com/report/github.com/gopherlibs/winpkg) [](https://godoc.org/github.com/gopherlibs/appindicator) [](https://raw.githubusercontent.com/gopherlibs/winpkg/trunk/LICENSE)
`winpkg` is a Go (Golang) module to pull the latest version of a Chocolatey package.
Chocolatey here is a Windows package manager.
## Requirements
This Go module is intended to support the ~~two~~ most recent ~~minor releases~~ release of Go.
Currently this is Go v1.18.x and v1.19.x.
## Installation
`winpkg` is a Go module intended to be used as a library.
So the best way to "install" it is to import into your own code and then run `go mod tidy` to get the source code downloaded.
```go
import(
"github.com/gopherlibs/winpkg/winpkg"
)
```
## Usage
```go
package main
import (
"fmt"
"github.com/gopherlibs/winpkg/winpkg"
)
func main() {
// Let's get the latest version of the 'git' package
if ver, err := winpkg.GetVersion( "git" ); err != nil {
fmt.Println(err)
} else {
fmt.Println(ver)
}
}
```
## Development
This module is written and tested with Go v1.18+ in mind.
`go fmt` is your friend.
Please feel free to open Issues and PRs are you see fit.
Any PR that requires a good amount of work or is a significant change, it would be best to open an Issue to discuss the change first.
## License & Credits
This module was written by Ricardo N Feliciano (FelicianoTech).
This repository is licensed under the MIT license.
This repo's license can be found [here](./LICENSE).