当前位置:网站首页>1 - first knowledge of go language
1 - first knowledge of go language
2022-04-23 14:40:00 【Endless character】
Catalog
One 、Go Introduction to language
- What is? Go Language :Go Is an open source programming language , It's meant to make it easy for people to build simple 、 reliable 、 Efficient software
- Go Language advantage
- ①. Fast running speed , Easy to learn
- ②. High salary
- ③. Suitable for blockchain development
- ④. Cross platform
- ⑤. Rich library of standards ( Instructions ),Go There are a lot of libraries built in , Especially the network library is very powerful
- ⑥.Go It can also directly contain C Code , Take advantage of the existing rich C library
- ⑦. Language level supports concurrency , This is Go The biggest feature , Born to support concurrency
- What is concurrency : All running programs take turns CPU, Each program is allowed to occupy CPU The time is very short ( such as 10 millisecond ), So the user doesn't feel it at all CPU Is serving multiple programs in turn , It's like all programs are running continuously . The advantage of concurrency is that you can run multiple programs , Not Caton
Two 、Go Environmental installation
- Go Installation package download address :https://golang.google.cn/dl/
- There were 32 Bit and 64 Bit installation package , Recommended download .msi Installation package for installation

- Go install : function msi The installation files , Never appear Chinese in the installation path , All the way Next
- GOPATH To configure : What will be written Go Program code method GOPATH Under the specified directory

- Go Install the test :cmd Command test
- go version: Output version
- go env: environmental information

3、 ... and 、 first Go Program
- compile Go Code :
go build file name .goWhat will be written Go Compile the code into a computer executable file - function exe Program :
.\Test.exe - Direct operation Go The source code file :
go run file name .goWill not generate exe file
package main
import "fmt"
func main(){
fmt.Print("Hello Go")
}

Four 、IDE-Goland
- Goland Download address :https://www.jetbrains.com/zh-cn/go/download/other.html
- According to your system , When the download is complete , All the way next Can be installed

- According to your system , When the download is complete , All the way next Can be installed
5、 ... and 、Go notes
- Single-line comments : grammar
//, Shortcut key -> CTRL+/ - Multiline comment : grammar
/* */, Shortcut key -> CTRL+ SHFIT +/
版权声明
本文为[Endless character]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231437071018.html
边栏推荐
猜你喜欢

1N5408-ASEMI整流二极管1N5408

51单片机+LCD12864液晶显示的俄罗斯方块游戏,Proteus仿真、AD原理图、代码、论文等

The art of automation

Interviewer: let's talk about the process of class loading and the mechanism of class loading (parental delegation mechanism)

金九银十,入职字节跳动那一天,我哭了(蘑菇街被裁,奋战7个月拿下offer)

流程控制之分支语句

555 timer + 74 series chip to build eight way responder, 30s countdown, proteus simulation, etc

UML项目实例——抖音的UML图描述

基于单片机的DS18B20的数字温度监控报警系统设计【LCD1602显示+Proteus仿真+C程序+论文+按键设置等】

Design of single chip microcomputer Proteus for temperature and humidity monitoring and alarm system of SHT11 sensor (with simulation + paper + program, etc.)
随机推荐
剑指 Offer II 019. 最多删除一个字符得到回文(简单)
Usage of BC
DVWA之暴力破解(Brute Force)Low-->high
Matrix exchange row and column
8.2 文本预处理
单片机的函数信号发生器,输出4种波形,频率可调,原理图,仿真和C程序
Want to be an architect? Tamping the foundation is the most important
Arduino for esp8266串口功能简介
1 minute to understand the execution process and permanently master the for cycle (with for cycle cases)
ArrayList集合基本使用
AT89C51 MCU digital voltmeter development, measuring range 0 ~ 5V, proteus simulation, schematic diagram, PCB and C program, etc
51单片机+LCD12864液晶显示的俄罗斯方块游戏,Proteus仿真、AD原理图、代码、论文等
Qt界面优化:鼠标双击特效
线程同步、生命周期
三、梯度下降求解最小θ
阿里研发三面,面试官一套组合拳让我当场懵逼
I/O复用的高级应用:同时处理 TCP 和 UDP 服务
【工厂模式详解】工厂方法模式
Logical volume creation and expansion
Achievements in science and Technology (21)