Golang entry and development environment configuration

Go language background birth

  • Computer hardware updated frequently, mainstream programming language can not play to the performance of multi-core CPU
  • Software system complexity continually high, the lack of simple and efficient programming language
  • C / C ++ run fast, but slow compilation

Go Language Features

  • Statically typed language development

    Static: compile-time type checking variables, such as C ++, Java

    Dynamic: run-time type checking variables, such as JavaScript

  • Automatic garbage collection

  • Fast compilation speed (compiled directly into machine code, does not depend on other libraries)

  • High concurrent performance (language-level support concurrent)

  • Easy to deploy (less dependency on library)

  • Function returns a plurality of values

Go language scenarios, open source framework

Scenario:

  • Block chain development
  • Server / game software development
  • Distributed / cloud computing development

Open source framework:

  • TPU
  • Lris
  • Revel

win10 development environment configuration Golang

Download: https://golang.google.cn/

About environment variable configuration:

I downloaded version is 1.13.5, after the msi file installed automatically add environment variables:

image-20191219215349950

image-20191219215510032

Test whether the installation was successful:

go version

image-20191219215622669

Integrated Development Environment Goland

Go official recommendation IDE:

image-20191219221020114

Goland Download: https://www.jetbrains.com/

Run HelloWorld

package main

import (
    "fmt"
)
func main() {
    fmt.Println("Hello ,World!")
}

image-20191223231924219

  • To .go file extension

  • package statement package belongs

  • End statement semicolon is omitted by default

  • No main entry point parameters, and must be placed in the main package

  • import import standard library / third-party packages

Guess you like

Origin www.cnblogs.com/noneplus/p/12090701.html
Recommended