Brother Lian Blockchain technology training share go language learning

Source: Internet
Author: User

The go language, as a server programming language, is suitable for processing logs, data packaging, virtual machine processing, file system, distributed system, database agent, etc. in network programming, the go language is widely used in Web applications, API applications, download applications, etc. in addition, the go language is also available for in-memory databases and cloud platform areas, At present, many foreign cloud platforms are using go development.

Brothers even the go language + Blockchain training courses Total 22 weeks of study duration, divided into 9 learning stages, that is, the main blockchain language-go language development practice, the Blockchain backend technology system-go Language high concurrency and server development, go development Zone block chain public chain (blockchain cryptography, distributed programming, Consensus algorithms, basic concepts, Golan Development), ETH and smart contracts and Dapp development, blockchain distributed application development, blockchain system framework development-Super ledger and Blockchain 3.0EOS, go and blockchain interview hardening and advanced enterprise-level project combat.

1. Import the package, a main function has only one main function, contains a main package, the main function we want to declare the main package!

Package Main

Func Main () {

}

2. Introduce package files, for example, we use the FMT package, print Helloword, Golang has a package visibility definition, such as private in other languages, protected these declarations. When the handwritten letter is lowercase is available in the package, outside the package can not be used, handwritten letters uppercase, reference package can be used! As an example: FMT. Println (); we'll find that the functions we use and reference are capitalized! The lowercase will call the wrong!

Package Main


Import "FMT"


Func Main () {

Fmt. Println

}


3. Package obfuscation mechanism, we can package the alias, for example, we feel that the package cannot remember or say the name of the package is similar to the use of this alias mechanism!


Package Main


Import str "FMT"


Package Main () {

Str. Println

}


4. Shorthand for multiple packages, constants, global variables, generic types, and more. When we have multiple constants, packages and so on how to declare it


Import (const (VAR (

"FMT" PI = "3.1415926" name =1

"NET" NAME = "Widuu" Age =12

"IO" age = "a" Wo = "Me"

)))

5. Declaration of variables and value of assignment and declaration


When there's no assignment, we'll find this.

When declared int float output is 0 declaration bool output is false

The reference packet math outputs the maximum value and the minimum value, such as the value of the maximum Int16 range FMT. Println (Math. MaxInt16)


6. Type declaration We can customize the type declaration, such as the following


Package Main


Import Std "FMT"


Type text string


Func Main () {

var a text

A = "Hello"

Std. Println (a)

}


7. Type Conversion


var a float32 = 100.01

B:=int (a)//output A is the value of 100.01 output B is 100

var c int = 65

D:=string (c)//output is a which is directly converted to text form a

B:=strconv. Itoa (c)//So the output is 65 direct text output

high-energy early warning, brother even education blockchain live course August continues to hit the hot!

The original price of 1188 Yuan of 12 block chain advanced courses, now only need 1 Yuan!

Also can receive free "Go Language foundation actual combat project development" and "Go language Advanced Combat Project development" textbook Two!! Limited time limit!! First come first served!!

Http://www.ydma.cn/open/course/24

Follow brother Lian Blockchain technology public number get more technical dry Goods Oh!!!

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.