Go language Revel Frame environment construction

Source: Internet
Author: User
Tags mercurial
This is a creation in Article, where the information may have evolved or changed.

First, install Go

Refer to the following articles:

Http://golang.org/doc/install

Http://www.cnblogs.com/ghj1976/archive/2013/01/16/2863142.html

Second, set Gopath

Refer to the following articles:

Http://www.cnblogs.com/ghj1976/archive/2013/03/24/2979668.html

Http://www.cnblogs.com/ghj1976/archive/2013/02/16/2913350.html

Ømac configuration Gopath

Mac can be set in the ~/.bash_profile file .

(Note : 1. ) If not . Bash_profile file, you create a.

2. If this document is available, the two sentences are appended at the end. )

Export Gopath= $HOME/mygo

Export path= $PATH: $HOME/mygo/bin

Note : If you do not configure the Gopath, you do not need to see it if configured.

-------------------------------------------------------

Øwindows configuration Gopath

Computer----> properties ----> Advanced system settings ----> Environment variables ----> Panel of System variables add gopath variable

Gopath C:\XXX\xxGo

-------------------------------------------------------

Third, install git and HG

Go get clones rely on Git and Mercurial

·  Installing Git

·  Installing Mercurial

Reference:http://www.cnblogs.com/ghj1976/archive/2013/03/08/2949237.html

Iv. access to the Revel framework

Go get Github.com/robfig/revel

If Gopathis not set, it will be downloaded to the goroot directory or downloaded to the first directory in Gopath .

Reference:http://www.cnblogs.com/ghj1976/archive/2013/03/08/2949237.html

V. Compiling Revel command-line tools

Execute the following command in your workspace gopath root directory:( note, switch to the gopath directory )

Ømac:

go build-o bin/revel github.com/robfig/revel/revel

Øwindows:

go build-o bin/revel.exe github.com/robfig/revel/revel

Ømac: adding Revel to environment variables

Put the compiled file into the PATH parameter so that we can execute it directly.

Export path= "$PATH: $GOPATH/bin"

echo ' path= ' $PATH: $GOPATH/bin "' >> ~/.bash_profile ( terminal configuration file for Mac system )

-------------------------------------------------------

Øwindows: adding Revel to environment variables

Computer----> properties ----> Advanced system settings ----> Environment variables ----> The Panel of the user variable appends the PATH variable

PATH; C:/xxx/mygo/bin

-------------------------------------------------------


Six, test Revel Installation Situation

Execute Revel help at the command line , and if you can see the information below, make sure the Revel is installed.

$ Revel Help
~
~ revel! Http://robfig.github.com/revel
~
Usage:revel command [arguments]

The commands are:

New Create a Skeleton Revel application
Run Run a Revel application
Build Build a Revel application (e.g. for deployment)
Package a Revel application (e.g. for deployment)
Clean Clean a Revel application ' s temp files
Test run all tests from the command-line

Use ' Revel Help [command] ' for more information.

Resources:

Http://robfig.github.com/revel/tutorial/gettingstarted.html


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.