# Packages
No description provided by the author
# README
gobrew - Homebrew client package for Go
Based loosely on https://github.com/micnncim/homebrew-go, but works by unmarshaling the structured JSON output of brew info
to Go structs.
gobrew
requires Homebrew be installed and linked, as it uses brew
under the hood. See installation instructions for how to setup Homebrew.
Usage
[!CAUTION] This package is in alpha state and not considered production-ready yet. There is a high possibility the interface changes. Please use caution and report issues.
Import the same way as any other Go package:
import "github.com/brewsync/gobrew"
Be sure to run
go get github.com/brewsync/gobrew
Methods
Currently only listing installed packages and querying an individual package as a go struct are supported. See examples below.
Examples
Check out examples for more, or simply:
import "github.com/brewsync/gobrew"
//...
brew := gobrew.New()
ctx, cancel := context.WithTimeout(
context.Background(),
time.Minute,
)
defer cancel()
packages, err := brew.List(ctx)
License
Brewsync Copyright @balintb