Go Initial Configuration

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

First of all, thank my boss let me touch the go language, I will be learning every day in the knowledge into the blog, as a record, with June encouragement

Information

Video Learning

Http://www.oschina.net/p/go-fundamental-programming

Text material

http://go-lang.cat-v.org/

Go1.2 Introduction to new features

http://my.oschina.net/chai2010/blog/160143

Go push

Https://github.com/Terry-Mao/gopush2#features


1. Configuring the Linux Environment

Export Goroot=~/downloads/go

Export path= $PATH: $GOROOT/bin

Export Gopath=~/downloads/gocode/sort: ~/downloads/gocode/calcproj

This is my BASHRC file.

Can be modified via vim ~/.BASHRC

Then update the changes you just made through source ~/.BASHRC

1) The Goroot directory is set to the Go installation package path

2) Gopath refers to the address of the project directory, can be used: add


2. Hierarchy of Packages

中文版 version, haha

Http://golang.org/doc/code.html

Chinese version

http://mikespook.com/2012/02/%E7%BF%BB%E8%AF%91go-%E7%8E%AF%E5%A2%83%E8%AE%BE%E7%BD%AE/

There is an engineering calcproj, which is first included in the Gopath.

You can export the $GOPATH first

Below are three folders src bin pkg

SRC is primarily a source file, which includes the Calc and Simplemath folders, which contain calc.go, called Simplemath below Add.go, divide.go

1) Go build Simplemath,

Go install Simplemath, then generate a LINUX386/SIMPLEMATH.A package in the PKG

2) Go Install Calc, then generate a calc executable file under Bin


3. Vim keyword highlighting configuration

To be Continued ...


copyright notice: This article for Bo Master original article, without Bo Master permission not reproduced.

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.