From 0117ae73119bc0a6cfe608128d2e8f689c07fde8 Mon Sep 17 00:00:00 2001 From: Steven Degutis Date: Thu, 29 Mar 2012 13:16:08 -0500 Subject: [PATCH] big update to readme --- README.md | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 4723b3f..b44fc50 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,34 @@ 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. +### Usage + + $ go test + +See "Better usage" below for a better way to run the tests. + +### 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`. + +### 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. + + $ go get github.com/sdegutis/fswatch + $ fswatch -f . -- go test + +(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 @@ -12,38 +40,10 @@ project directories need to be under `$GOPATH/src` for the `go` command to be us $ export GOPATH=~/my-go-projects $ mkdir -p $GOPATH/src -Since the `$GOPATH` is useful any time in Go, this is recommended: +Since the `$GOPATH` is almost necessary for Go, it's recommended that this goes in your `~/.profile`: - $ echo 'export GOPATH=~/my-go-projects' >> ~/.profile - -### Install the Koans - - $ cd $GOPATH/src - $ git clone https://sdegutis@github.com/sdegutis/go-koans.git - $ cd go-koans - -### 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 - - $ go test - -### 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. - - $ go get github.com/sdegutis/fswatch - $ fswatch -f . -- go test - -It's kind of like watchr, or so I've been told. 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. + export GOPATH="$HOME/my-go-projects" + export PATH="$GOPATH/bin:$PATH" ### Benefaxion