Learn go language (1)

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

Affected by the 11 article, yesterday looked at some of the Go language video, this morning to the environment are well-acquainted with a bit, although still a little not fit, but finally can write a piece of code without error. At present, is familiar with the main, every day to write a blog to remember, perhaps write more slowly adapt to. Casual play, purely entertainment (although not to mention the introduction and understanding, but concise grammatical features are very good)

about how to install and configure the environment I will not share, there are many online blogs have to share. Example: http://blog.csdn.net/qiurisuixiang/article/details/8728152

An example of an array of normal and inverted outputs:

Hellogo Project Main.gopackage mainimport ("FMT") var _intarr []intfunc Main () {_intarr: = []int{1, 2, 3, 4, 5}for i: = Range _intarr {fmt. Println (_intarr[i])}reverse (_intarr) for I: = Range _intarr {fmt. Println (_intarr[i])}}func Reverse (_intarr []int) {temp, Count: = 0, Len (_intarr) for I: = 0; i < COUNT/2; i++ {temp = _i Ntarr[count-1-i]_intarr[count-1-i] = _intarr[i]_intarr[i] = temp}}



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.