Go language Learning

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

1. Configure Environment variables

2. Instructions and documentation for local reading of the newspaper do not FQ

Window+r appears black window execution godoc-http:8080

In the local browser localhost:8080 enter

3 multi-line Comment/**/

4 keyword 25

Const PI = 3.14//Declaration of constants

Type NewType//general type

var name = "Gopher"//Declaration of global variables

Structure Declaration

Type gopher struct {}

Interface

Type Golang interface{}

5. Tips for guiding the package

Import (

"FMT"

"OS"

)

6 Hello world!

Package Main

Func Main () {

Fmt. Println ("Hello world!")

}

7. Using an ellipsis call or alias cannot exist simultaneously

<1 using aliases

<2

8. Case

Uppercase public can be called

lowercase equals private

Three types and variables

The variable group function cannot be declared!

such as VAR (

...

)

Unint8 byte 0-255

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.