当前位置:网站首页>go 学习01
go 学习01
2022-07-28 00:33:00 【小丫头呀】
1. 首先执行编译 go build xxx

2.直接运行编译后的生成的.exe 文件,然后报错

3. 解决,看清楚错误提示就好了。

3.基础指令
3.1 清除 vs code控制台指令: clear
3.2 编译go 文件指令: go build 文件名
- 编译go ,如果go build 指定文件名,则编译指定go 文件
- 编译go,如果go build 不指定文件名,则编译当前目录下所有的go 项目文件
- 如果要显示编译的过程,在编译文件名前面加上前缀 -x ,例如go build -x h.go
- 编译go 文件,如果想指定编译后的文件别名:go build -x -o test.exe h.go
5.打印编译的临时目录:go build -o test.exe -work h.go
3.3 删除编译好的go 文件指令: rm 编译好的文件名

3.4 直接终端运行go 文件指令:go run helloworld.go
go run 指令是先编译,后运行。go run -x helloworld.go 这样就可以直观看到了
- -x 打印过程 并运行
- -n 打印过程,但不运行,例如 go run -n helloworld.go ,只是打印了过程,没有运行该go 文件。
3.5 查看当前目录下所有的文件指令: dir

4.程序代码解释

边栏推荐
- Fiddler 手机抓包代理设置(针对华为荣耀60S)
- Establishment of elk log analysis system
- 硬件SPI与软件模拟SPI速率对比
- Gbase 8C transaction ID and snapshot (III)
- Real time synchronization and conversion of massive data based on Flink CDC
- Netease cloud copywriting
- 2022 software testing skills robotframework + selenium library + Jenkins web Keyword Driven Automation practical tutorial
- GBase 8c 事务ID和快照(六)
- JS what situations can't use json Parse, json.stringify deep copy and a better deep copy method
- The petrochemical industry is facing the tide of rising prices, and the digital dealer distribution system platform enables dealers and stores
猜你喜欢

Cloud native enthusiast weekly: the evolution of Prometheus architecture

Data warehouse construction - DWS floor

Redis design specification

53:第五章:开发admin管理服务:6:开发【admin管理员退出登录,接口】;(一个点:我们想要修改一个采用了某种编码方式的值时,新的值最好也按照这种编码方式编码后,再去修改;)

硬件SPI与软件模拟SPI速率对比

Interviewer: are you sure redis is a single threaded process?

云原生爱好者周刊:Prometheus 架构演进之路

Fluorite network, difficult to be a "lone brave"

FreeRTOS内核小结

Establishment of elk log analysis system
随机推荐
sftp文件/文件夹上传服务器
Custom type: structure, enumeration, union
Software testing interview question: what do you think is the key to good test case design?
GBase 8c 事务ID和快照(六)
Graph theory analysis of white matter brain function network: neural markers for classification and prediction of depression
实时数仓:美团的实时数仓建设实践
开源飞控(PX4、ardupilot)
一种比读写锁更快的锁,还不赶紧认识一下
损失函数-交叉熵的原理及实现
Redis design specification
What are the important applications of MES system in manufacturing enterprises
BGP联邦实验
Gbase 8C transaction ID and snapshot (III)
Completely delete MySQL in Linux system
N32L43x Flash读\写\擦除操作总结
BGP federal experiment
How tormenting are weekly and monthly reports? Universal report template recommended collection! (template attached)
Linux安装mysql8.0.29详细教程
递归的使用:1.将平铺数组转为树 2.将树转化为平铺数组
A letter to the user of qubu drawing bed

