第一篇 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


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

查看所有标签

猜你喜欢:

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

Two Scoops of Django

Two Scoops of Django

Daniel Greenfeld、Audrey M. Roy / CreateSpace Independent Publishing Platform / 2013-4-16 / USD 29.95

Two Scoops of Django: Best Practices For Django 1.5 is chock-full of material that will help you with your Django projects. We'll introduce you to various tips, tricks, patterns, code snippets, and......一起来看看 《Two Scoops of Django》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具