当前位置:网站首页>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 .go
What 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 .go
Will 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
边栏推荐
- LLVM - 生成局部变量
- Chapter 7 of JVM series -- bytecode execution engine
- Mq-2 and DS18B20 fire temperature smoke alarm system design, 51 single chip microcomputer, with simulation, C code, schematic diagram, PCB, etc
- 51单片机的直流电机PWM调速控制系统(附Proteus仿真+C程序等全套资料)
- 单片机的函数信号发生器,输出4种波形,频率可调,原理图,仿真和C程序
- UML项目实例——抖音的UML图描述
- 1N5408-ASEMI整流二极管1N5408
- 矩阵交换行列
- Unity_代码方式添加绑定按钮点击事件
- 初识STL
猜你喜欢
redis的五种数据类型
MySQL报错packet out of order
A blog allows you to learn how to write markdown on vscode
流程控制之分支语句
51单片机的花卉、农田自动浇水灌溉系统开发,Proteus仿真,原理图和C代码
51 Single Chip Microcomputer Design of traffic light system (with Proteus simulation, C program, schematic diagram, PCB, thesis and other complete data)
MQ-2和DS18B20的火灾温度-烟雾报警系统设计,51单片机,附仿真、C代码、原理图和PCB等
爬虫练习题(一)
51单片机+LCD12864液晶显示的俄罗斯方块游戏,Proteus仿真、AD原理图、代码、论文等
Nacos uses demo as configuration center (IV)
随机推荐
【JZ46 把数字翻译成字符串】
查找水仙花数-for循环实践
vscode中文插件不生效问题解决
Detailed explanation of SAR command
全连接层的作用是什么?
raised exception class EAccexxViolation with ‘Access violation at address 45EFD5 in module 出错
直流可调稳压电源的Proteus仿真设计(附仿真+论文等资料)
8.3 语言模型与数据集
PCIe X1 插槽的主要用途是什么?
51 MCU + LCD12864 LCD Tetris game, proteus simulation, ad schematic diagram, code, thesis, etc
八路抢答器系统51单片机设计【附Proteus仿真、C程序、原理图及PCB文件、元器件清单和论文等】
C语言知识点精细详解——数据类型和变量【2】——整型变量与常量【1】
555 timer + 74 series chip to build eight way responder, 30s countdown, proteus simulation, etc
555定时器+74系列芯片搭建八路抢答器,30s倒计时,附Proteus仿真等
First acquaintance with STL
外包幹了四年,廢了...
流程控制之分支语句
51单片机的花卉、农田自动浇水灌溉系统开发,Proteus仿真,原理图和C代码
C语言知识点精细详解——数据类型和变量【1】——进位计数制
LLVM - 生成 if-else 以及 PH