% sudo apt-get install mercurial
# {{{ GO
export GOROOT=$HOME/go # goコマンドへのパス/bin (exportせずとも、PATHへのバインドさえすれば良い気もする) る)
export GOPATH=$HOME/go/.packages # go get でインストールしてくるパッケージへのパス/bin/bin
# こっちはgo getするときに参照されるので、exportする必要有り
# }}}
export PATH=/usr/local/bin:$CABAL_PATH:$NPM_PATH:$NODE_PATH:$GOROOT/bin:$GOPATH/bin:~/bin:$PATH
wget appropriate sourcecode from go.google.com according to your CPU and OS command bit -> http://d.hatena.ne.jp/sakurako_s/20100714/1279118139
% wget wget https://go.googlecode.com/files/go1.1.2.linux-386.tar.gz
% tar -xzf go1.1.2.linux-386.tar.gz
% cd go/src
% ./all.bash
...
ALL TESTS PASSED
---
Installed Go for linux/386 in /home/otiai10/go
Installed commands in /home/otiai10/go/bin
% go get github.com/robfig/revel/revel
and revel
command will be installed in $GOPATH/bin/
revel run github.com/robfig/revel/samples/chat
これどこ参照してんの?
[3:04:45] % tree $GOPATH/src/github.com/robfig/revel/samples/chat
/home/hiromu/go/.packages/src/github.com/robfig/revel/samples/chat
|-- app
| |-- chatroom
| | `-- chatroom.go
| |-- controllers
| | |-- app.go
| | |-- longpolling.go
| | |-- refresh.go
| | `-- websocket.go
| |-- routes
| | `-- routes.go
| |-- tmp
| | `-- main.go
| `-- views
| |-- Application
| | `-- Index.html
| |-- LongPolling
| | `-- Room.html
| |-- Refresh
| | `-- Room.html
| |-- WebSocket
| | `-- Room.html
| |-- footer.html
| `-- header.html
|-- conf
| |-- app.conf
| `-- routes
|-- public
| |-- images
| | `-- favicon.png
| |-- javascripts
| | |-- jquery-1.5.min.js
| | |-- jquery.scrollTo-min.js
| | `-- templating.js
| `-- stylesheets
| `-- main.css
`-- tests
`-- apptest.go
16 directories, 21 files
ここや
% mkdir ~/prj/go/revel/hello
% cd ~/prj/go/revel/hello
%
watching
https://gist.github.com/JesseObrien/5667377