Go Language programming

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

Go language

    1. Parallel and distributed
    2. Software engineering support
    3. Programming philosophy

Executive Body

Go language Features

自动垃圾回收更丰富的内置类型函数多返回值错误处理匿名函数和闭包类型和接口并发编程反射语言交互性
#环境的搭建yum -y install golang

Hello World

root@122159d23f8e:~# cat hello.gopackage mainimport"fmt"func main(){ fmt.Println("Hello world!")}root@122159d23go run hello.go Hello world!root@122159d23

Built-in types

go The language contains the following basic types: Boolean type: bool . Integral type: int8 , byte , int16 , int ,  UINT , uintptr , and so on. Floating-point type: float32 , float64  Complex Type: complex64 , complex128 . String: string . Character type: rune . Fault type: Error. In addition, the go language supports these composite type pointer (pointer) array (array) slices (slice) dictionaries (map ) channels ( chan ) struct (struct ) interface ( interface )  
 #数组特点 value type  If you use an array as the parameter type for a function, the parameter will occur when the function is called for data replication. Therefore, the contents of the incoming array cannot be modified in the body of the function, because only one copy of the incoming array is manipulated inside the function.  #数组切片   

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.