The "Go" Learning Trip -- 0. Base build

# Environmental installation

# Official address :(over the wall may be required)

https://golang.org/dl/

 

# IDE Tools: (Visual Studio Code)

https://code.visualstudio.com/?wt.mc_id=vscom_downloads

 

 

 

# envionment variables

Once the installation is complete, it needs to be set in the system environment variables

 

 

"GOPATH" is Project Directory

 

"GOROOT" is The "Go" Install Directory

PATH needs set up the installation directory in bin directory

 

# Open CMD shell , Input "go env" check it 

 

 

扩展了解:

对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github.com/microsoft/vscode-go

这款插件的特性包括:

 

Colorization 代码着彩色

Completion Lists 代码自动完成(使用gocode)

Snippets  代码片段

Quick Info 快速提示信息(使用godef)

Goto Definition 跳转到定义(使用godef)

Find References  搜索参考引用(使用go-find-references)

File outline 文件大纲(使用go-outline)

Workspace symbol search 工作区符号搜索(使用 go-symbols)

Rename 重命名(使用gorename)

Build-on-save 保存构建(使用go build和go test)

Format 代码格式化(使用goreturns或goimports或gofmt)

Add Imports  添加引用(使用 gopkgs)

Debugging 调试代码(使用delve)

 

# 按下F5,提示不能调试,要安装调试工具。

go get -v -u github.com/peterh/liner   

go get -v -u github.com/derekparker/delve/cmd/dlv

 

go get -u -v github.com/nsf/gocode

go get -u -v github.com/rogpeppe/godef

go get -u -v github.com/golang/lint/golint

go get -u -v github.com/lukehoban/go-find-references

go get -u -v github.com/lukehoban/go-outline

go get -u -v sourcegraph.com/sqs/goreturns

go get -u -v golang.org/x/tools/cmd/gorename

go get -u -v github.com/tpng/gopkgs

go get -u -v github.com/newhook/go-symbols

 

posted @   Cong0ks  阅读(157)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示