Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeczalik committed Aug 1, 2014
1 parent 2a1feab commit 88986a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bin [![GoDoc](https://godoc.org/github.com/rjeczalik/bin?status.svg)](https://godoc.org/github.com/rjeczalik/bin) [![Build Status](https://travis-ci.org/rjeczalik/bin.png?branch=master)](https://travis-ci.org/rjeczalik/bin "linux_amd64") [![Build Status](https://travis-ci.org/rjeczalik/bin.png?branch=osx)](https://travis-ci.org/rjeczalik/bin "darwin_amd64") [![Build status](https://ci.appveyor.com/api/projects/status/sl6pjb76vk3uw4s2)](https://ci.appveyor.com/project/rjeczalik/bin "windows_amd64")
=========

Mainly searches for Go executables in `$PATH`, `$GOBIN`, `$GOPATH` and updates them automagically. But it's capable of more than that.
Package `bin` looks for Go executable system-wide (`$PATH`, `$GOBIN`, `$GOPATH`), lists them, reads their import paths, fetches their sources and updates them.

**NOTE** Go version 1.3 required.

Expand All @@ -17,8 +17,10 @@ Mainly searches for Go executables in `$PATH`, `$GOBIN`, `$GOPATH` and updates t

[godoc.org/github.com/rjeczalik/bin/cmd/gobin](http://godoc.org/github.com/rjeczalik/bin/cmd/gobin)

*Usage*
*Source example*

![gobin](https://i.imgur.com/AEimmsY.gif "gobin")
![gobin -s](https://i.imgur.com/2qs25Cg.gif "gobin -s")

**NOTE** Bumping GOMAXPROCS value up may speed up gobin significantly.
*Update example*

![gobin -u](https://i.imgur.com/AEimmsY.gif "gobin -u")
23 changes: 21 additions & 2 deletions cmd/gobin/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Command gobin updates Go commands by reading their import paths, go-getting
// Command gobin Go commands by reading their import paths, go-getting
// their repositories and building new executables.
//
// Command gobin can search for and list Go executables, create a $GOPATH workspace
Expand All @@ -11,6 +11,25 @@
// it finds on a system. It can be used to create precise mirror of the sources
// for system Go executables, without any unneeded packages.
//
// ~ $ gobin -s /tmp/gopath godoc golint goimports gotree gowhich
// code.google.com/p/go.tools (download)
// github.com/rjeczalik/tools (download)
// github.com/rjeczalik/which (download)
// (...)
// github.com/rjeczalik/which/cmd/gowhich
// code.google.com/p/go.tools/cmd/godoc
// ~ $ tree -L 3 /tmp/gopath/src/
// /tmp/gopath/src/
// ├── code.google.com
// │   └── p
// │   └── go.tools
// └── github.com
// └── rjeczalik
// ├── tools
// └── which
//
// 7 directories, 0 files
//
// Update
//
// Command gobin can update single executable or automagically discover all of
Expand All @@ -35,7 +54,7 @@
// Usage
//
// NAME:
// gobin - performs discovery of Go executables ($PATH/$GOBIN/$GOPATH),
// gobin - looks for Go executables system-wide ($PATH/$GOBIN/$GOPATH),
// lists them, fetches their sources and updates them
//
// USAGE:
Expand Down

0 comments on commit 88986a6

Please sign in to comment.