Blogger Information
Blog 5
fans 0
comment 0
visits 3069
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Go环境安装、配置
echo
Original
539 people have browsed it

GO安装

GOPATH设置

  • 1.在系统环境变量配置GOPATH(E:\code\go)
  • 2.新建三个文件src,pkg,bin
  • 3.将E:\code\go\bin放入系统环境变量
  • 4.go env查看go相关环境变量

GO项目结构

  • 1.自己写的代码放在src目录下
  • 2.一般个人开发目录结构为 github.com/xxx/项目名
  • 3.公司项目开发目录结构为 公司域名/项目组/项目

编译

  • 1.go build 项目目录下
  • 2.go build 文件路径 编译后的文件放在当前目录下
  • 3.go build -o 指定编译文件名称
  • 4.go run main.go直接运行脚本
  • 5.go install先编译再将可执行文件拷贝到GOPATH/bin目录下
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post