Skip to content

Commit

Permalink
better readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Degutis committed Mar 30, 2012
1 parent 1d1a88d commit 529ae78
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,30 @@ Want to learn Go? Want to do it easily? Want to have fun with it? Want lots of m

I can't help you out with that last one. Sorry.

### References

Bookmark the [spec](http://golang.org/ref/spec) and the
[packages listing](http://golang.org/pkg/). You can also
run the Go website locally with `godoc -http=:8080`.

### Usage

First, [install Go](http://code.google.com/p/go/downloads/list). Then:

$ go test

Now make the failing tests pass, by replacing these types of `__variables__` with real values.

### Better usage

Annoyed at having to switch between your editor and terminal, just to type `go test` over and over?
As you should be! So download fswatch and let it run your tests for you any time you save a file.
If you want to have `go test` be run in your terminal any time you save a file and
are using a Mac, take a look at [fswatch](github.com/sdegutis/fswatch).

$ go get github.com/sdegutis/fswatch
$ fswatch -f . -- go test
### Helpful References

(If you get a 'permission denied' error on the 'go get' command and don't want to use sudo, do the
"Go Setup" steps below.)

fswatch is kind of like watchr, but it's a native executable, written in Go, and only runs on Macs
(you are using a Mac, right?) using the Apple-specific FSEvents framework. So it doesn't poll files
or anything inefficient like that. It's very healthy for your system. And it's not a gem and so
doesn't depend on any other programs, it's just a native compiled executable.

### Go Setup

After installing Go, these steps are necessary before any Go project will work. All
project directories need to be under `$GOPATH/src` for the `go` command to be useful.
Bookmark the [spec](http://golang.org/ref/spec) and the
[packages listing](http://golang.org/pkg/). You can also
run the Go website locally with `godoc -http=:8080`.

$ export GOPATH=~/my-go-projects
$ mkdir -p $GOPATH/src
### Go support in Vim

Since the `$GOPATH` is almost necessary for Go, it's recommended that this goes in your `~/.profile`:
Add this to your `~/.vimrv` file:

export GOPATH="$HOME/my-go-projects"
export PATH="$GOPATH/bin:$PATH"
set rtp+=/usr/local/go/misc/vim
filetype plugin indent on
syntax on

### Benefaxion

Expand Down

0 comments on commit 529ae78

Please sign in to comment.