Go language version HelloWorld

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. Go language version HelloWorldAuthor: Rainwater, Date: 2016-04-01 csdn Blog: Http://blog.csdn.net/gobitan Summary:The go language is a new language released in the Google2009 year, reducing the complexity of your code without compromising application performance. More and more widely used now, many game servers are already written in the go language, and the other famous Docker containers are written in the go language.
Go language Environment buildingNote: Take ubuntu14.04 as an example, choose one of the following two ways Apt-get Waydennis@ubuntu14:~$ sudo apt-get install gccgo-go
Download the installation package method$ wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz$ sudo tar-c/usr/local-xzf go1.6.linux-amd64.tar.gz Add the following sections to/etc/profileexport goroot=/usr/local/goexport path= $PATH: $GOROOT/binexport GOPATH = $HOME/work
$ . /etc/profile
Write and run Hello worlddennis@ubuntu14:~$ mkdir-p work/src/hellodennis@ubuntu14:~$ CD work/dennis@ubuntu14:~/work/src/hello$ VI src/hello/ Hello.go Package Main
import "FMT"
Func Main () { FMT. Printf ("Hello, world\n") }dennis@ubuntu14:~/work$ Go install hellodennis@ubuntu14:~/work$ $GOPATH/bin/hellohello, worlddennis@ubuntu14:~/work $
References:[1] Https://golang.org/doc/install
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.