這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。
1、安裝 Revel 架構
$ go get github.com/revel/revel
2、安裝 Revel 命令列工具
$ go get github.com/revel/cmd/revel
3、建立 Revel 應用
$ revel new myapp$ revel run myapp
註:因為google被牆,所以需要在安裝revel之前自行下載go的websocket,放入你設定好的gopath/src目錄下(我在這裡下載的go websocket :http://golang.so/thread-143-1-1.html)要使用revel命令執行:go build -o bin/revel.exe github.com/revel/revelgo build -o bin/revel.exe github.com/revel/cmd/revel試了上面兩個方法產生revel.exe,感覺好像都一樣,隨便用一個就好產生好的revel.exe就存放在gopath/bin下 使用過程中,用到sqlite3(go get github.com/mattn/go-sqlite3),結果報錯cc1.exe: sorry, unimplemented: 64-bit mode not compiled in需要使用gcc,本來的系統中有msys而且配置了環境變數了,可惜不是64位的不行然後找方法:方法1.下載64位MinGW,把bin加到環境變數,下載地址為http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64/Personal Builds/mingw-builds/4.8.2/threads-posix/seh/方法2.下載TDM-GCC-64,安裝時選擇加入到環境變數就好,下載地址http://tdm-gcc.tdragon.net/download 重啟cmd視窗,ok!