当前位置:网站首页>Vscode build go development environment

Vscode build go development environment

2022-05-14 13:59:12JackieZhengChina

Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right


Preface


It works golang Just use golang.. This configuration is troublesome Tips : The following is the main body of this article , The following cases can be used for reference

One 、 install goLang

Installation address

Choose according to the system

 Insert picture description here

Two . To configure environment variable

 Insert picture description here

 Insert picture description here

# stay cmd Input in 
go servion

 Insert picture description here
Environment variables are configured

3、 ... and 、vscode Installing a plug-in

 Insert picture description here

Four . install golang rely on

cmd Execute with administrator privileges

go env -w GOSUMDB=off
go env -w GOPROXY=https://goproxy.cn

go install -v github.com/rogpeppe/[email protected]
go install -v github.com/golang/lint/[email protected]
go install -v github.com/lukehoban/[email protected]
go install -v github.com/lukehoban/[email protected]
go install -v sourcegraph.com/sqs/[email protected]
go install -v golang.org/x/tools/cmd/[email protected]
go install -v github.com/tpng/[email protected]
go install -v github.com/newhook/[email protected]
go install -v golang.org/x/tools/cmd/[email protected]
go install -v github.com/derekparker/delve/cmd/[email protected]

5、 ... and . newly build go file

 Insert picture description here
 Insert picture description here

package main

import "fmt"

func main() {
	fmt.Println("Hello, World!")
}

Pop up upgrade plug-in , Just rise .
Since there is no auto save code set, you must first ctrl+s preservation Press ctrl+alt+n Run or shortcut key run

 Insert picture description here



---------------------
author : Stay cute Xiaoxin @ Yuanjie
source :CSDN
original text :https://blog.csdn.net/m0_50913327/article/details/121912387
Copyright notice : This is the author's original article , Please attach a link to the blog post !
Content analysis By:CSDN,CNBLOG One click reprint plugin for blog posts

原网站

版权声明
本文为[JackieZhengChina]所创,转载请带上原文链接,感谢
https://chowdera.com/2022/134/202205141344460050.html

随机推荐