第一篇 go开发环境搭建

栏目: Go · 发布时间: 6年前

内容简介:a, 打开网址:https://github.com/derekparker/delve/tree/master/Documentation/installationc. linux&windows: go get

1. 安装Go

a. 打开网址https://golang.org/dl/
b. 根据操作系统选择对应的安装包
c. 点击安装包进行安装(linux直接解压)
d. 设置环境变量(linux)
        1. export GOROOT=$PATH:/path/to/go/  
        2. export PATH=$PATH:$GOROOT/bin/ 
        3. export GOPATH=/home/user/project/go
e. 设置环境变量(window不用设置)

2. IDE搭建(vscode)

 a. 打开网址:https://code.visualstudio.com/ 
 b. 根据操作系统选择对应的安装包
 c. 点击安装包进行安装(linux直接解压)
 d. 选择查看-》扩展-》搜索go,安装第二个 

3. 新建项目

a.新建目录/home/user/project/go/src/listen1
b. 用vscode打开目录/home/user/project/go/src/listen1
c. 右键新建文件hello.go,保存
d. vscode会提示你安装一些 go 的工具,我们点击install all

4. 调试工具delve安装

a, 打开网址:https://github.com/derekparker/delve/tree/master/Documentation/installation

c. linux&windows: go get github.com/ derekparker /delve/ cmd /dlv


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Usability for the Web

Usability for the Web

Tom Brinck、Darren Gergle、Scott D. Wood / Morgan Kaufmann / 2001-10-15 / USD 65.95

Every stage in the design of a new web site is an opportunity to meet or miss deadlines and budgetary goals. Every stage is an opportunity to boost or undercut the site's usability. Thi......一起来看看 《Usability for the Web》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试