Go programming language First Use

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. Original address: http://bbjava.iteye.com/blog/2004373
This article is intended for Linux.
First get the Go language kit download address: https://go.googlecode.com/files/go1.2.linux-386.tar.gz
Put it in any directory of Linux.
Using a command reference
TAR-XF go1.2.linux-386.tar.gz

Execute command re-execute: LS
You will see a directory named "Go" in the current directory.
[Root@blade go]# cd go[root@blade go]# lsapi      blog          favicon.ico  LICENSE  pkg         srcauthors  CONTRIBUTORS  include      misc     README      testbin      Doc           lib          patents  robots.txt  VERSION


Enter the SRC directory:
[Root@blade go]# cd src[root@blade src]# lsall.bash  clean.bash  cmd     libmach    make.dist  Race.bash  run.batall.bat   clean.bat   lib9    make.bash  make.rc    race.bat   run.rcall.rc    Clean.rc    libbio  make.bat   pkg        run.bash   sudo.bash


Then, install the kit
Type the command:

Wait for it to finish.


Finally, the installation is complete, there are several lines, one of the more important sentence:
You must add the/home/blade/go/go/bin to PATH.

In general, path is configured in the directory:/etc profile.

For example, my configuration is this:
Export path= $PATH:/home/blade/go/go/bin


Configured, and then enter the Source/etc/profile notification system profile updated.

It should have succeeded now that he had installed Ann.

Hello World in Go programming language

Type the code using VI:
Reference
Package Mainimport "FMT" Func Main () {FMT. Println ("Hello,world")}


Perform


The installation and initial use of this go language is complete. It's simple.
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.