This is a creation in Article, where the information may have evolved or changed.
Use advanced technology to build a go web development environment
1. Installing the Go language does not introduce too much here, just execute the following command
Brew Install Go
2. Configure Gopath to add the following configuration in/etc/profile
export gopath= "/USR/LOCAL/CELLAR/GO/1.5.1/" Export path= "/usr/local/cellar/go/1.5.1/bin: $PATH"
Where the/USR/LOCAL/CELLAR/GO/1.5.1/directory is the local go installation directory 3. Install Revel
go get github.com/revel/revel go get github.com/revel/cmd/revel
ifEncountered installation is not successful live dependent import error issues, you can refer to the Golang Chinese community across the wall to download and execute the installation Components 4. Create a web App with Revel
Revel new App
In this case, you can see the following structure in the Gopath directory
app/code.google.com/github.com/golang.org/gopkg.in/
Execute the following command
Revel new App
We'll see it on the console.
~ ~ revel! Http://revel.github.io ~ Info 2015/11/24 00:34:20 revel.go:329:loaded module Testrunner Info 2015/11/24 00:34:20 revel.go:329:loaded module Static INFO 2015/11/24 00:34:20 revel.go:206:initialized Revel v0.12.0 (2015-03-25) For >= go1.3 info 2015/11/24 00:34:20 run.go:57:running app (apps) in dev mode INFO 2015/11/24 00:34:20 harness.go:165 : Listening on:9000
Access the browser (http://localhost:9000) to see
It WorksThe screen from this, a standard go Web application will be generated, we can be on top of the dashing play up, enjoy it,
Let ' s go!