Giter Site home page Giter Site logo

brew-go's Introduction

brew-go

Gem version

Manage Go tools via Homebrew. Don't clutter your $GOPATH anymore.

Internally brew-go still relies on go get, but puts things into /usr/local/Cellar/brew-go-*, builds the binary, removes everything else that was needed for building, and links the binary to /usr/local/bin/*. All in one go.

The gem was inspired by this blog post.

Installation

$ gem install brew-go

If you're not a Ruby user, chances are that you use the system's /usr/bin/gem, which tries installing to a directory that isn't writable by the user. Assuming you have a local bin directory in $PATH, e.g. ~/bin, use this instead:

$ gem install --user-install -n ~/bin brew-go

Alternatively, just download the script in any directory from $PATH and make it executable.

Usage

See brew go for all available commands.

Example:

$ brew go get guru golang.org/x/perf/cmd/benchstat
[✓] benchstat (golang.org/x/perf/cmd/benchstat)
[✓] guru (golang.org/x/tools/cmd/guru)

$ which benchstat guru
/usr/local/bin/guru
/usr/local/bin/benchstat

$ brew go list
benchstat (golang.org/x/perf/cmd/benchstat)
guru      (golang.org/x/tools/cmd/guru)

$ brew go list guru
/usr/local/Cellar/brew-go-guru/golang.org#x#tools#cmd#guru/bin/guru

$ brew go update guru
[✓] brew-go-guru (golang.org/x/tools/cmd/guru)

$ brew go rm guru
Uninstalling /usr/local/Cellar/brew-go-guru/golang.org#x#tools#cmd#guru... (7.8MB)

$ brew uninstall brew-go-benchstat
Uninstalling /usr/local/Cellar/brew-go-benchstat/golang.org#x#perf#cmd#benchstat... (3.6MB)

$ brew go common
Here are a few commonly used tools. The names can be used as shortcuts:
  $ brew go get guru

benchstat    (golang.org/x/perf/cmd/benchstat)
dlv          (github.com/derekparker/delve/cmd/dlv)
errcheck     (github.com/kisielk/errcheck)
fillstruct   (github.com/davidrjenni/reftools/cmd/fillstruct)
gocode       (github.com/nsf/gocode)
godef        (github.com/rogpeppe/godef)
goimports    (golang.org/x/tools/cmd/goimports)
golint       (github.com/golang/lint/golint)
gometalinter (github.com/alecthomas/gometalinter)
gorename     (golang.org/x/tools/cmd/gorename)
gotags       (github.com/jstemmer/gotags)
guru         (golang.org/x/tools/cmd/guru)
impl         (github.com/josharian/impl)
interfacer   (mvdan.cc/interfacer)
staticcheck  (honnef.co/go/tools/cmd/staticcheck)
unused       (honnef.co/go/tools/cmd/unused)

brew-go's People

Contributors

mhinz avatar

Watchers

Jason Lee Ertle avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.