当前位置:网站首页>GoLand 2021.2 configure go (go1.17.6)
GoLand 2021.2 configure go (go1.17.6)
2022-07-03 13:48:00 【Lao Liu, you are so awesome】
One , To configure settings:
1, Open the configuration screen :
file->settings->Go
Pictured :

2, To configure GOROOT, Pictured :

3, To configure GOPATH, Pictured : No need to configure :

4,Go Modules: Choose Enable Go modules integration
Selected by default , No need to configure

explain : Liu Hongdi's go The forest is a focus golang The blog of ,
Address :https://blog.csdn.net/weixin_43881017
explain : author : Liu Hongdi mailbox : [email protected]
Two , add to configuration
Click on Add Configuration

Pictured :

Click on + Button , choice Go Build, Pictured :

spot OK Button , The toolbar is shown in the figure :

Point the green right triangle arrow , The project starts running

Red square button Click on You can stop the project
3、 ... and , The test results :
1, Code :
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
// Declare a default route
r := gin.Default()
r.GET("/book", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "GET",
})
})
r.POST("/book", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "POST",
})
})
r.Run(":8080")
}
2, function :
After startup console

The project is already accessible through the browser , Pictured :

Four , see goland Version of :

5、 ... and , see go Version of :
[email protected]:/data/goapp/hello$ go version
go version go1.17.6 linux/amd64边栏推荐
- Start signing up CCF C ³- [email protected] chianxin: Perspective of Russian Ukrainian cyber war - Security confrontation and sanctions g
- Box layout of Kivy tutorial BoxLayout arranges sub items in vertical or horizontal boxes (tutorial includes source code)
- The shadow of the object at the edge of the untiy world flickers, and the shadow of the object near the far point is normal
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- 常见的几种最优化方法Matlab原理和深度分析
- Screenshot of the operation steps of upload labs level 4-level 9
- 使用tensorflow进行完整的DNN深度神经网络CNN训练完成图片识别案例
- logback日志的整理
- Unity render streaming communicates with unity through JS
- Golang — 命令行工具cobra
猜你喜欢

CVPR 2022 | interpretation of 6 excellent papers selected by meituan technical team

AI scores 81 in high scores. Netizens: AI model can't avoid "internal examination"!

RichView TRVStyle ListStyle 列表样式(项目符号编号)

Can newly graduated European college students get an offer from a major Internet company in the United States?

使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2

MyCms 自媒体商城 v3.4.1 发布,使用手册更新

The latest BSC can pay dividends. Any B usdt Shib eth dividend destruction marketing can

106. How to improve the readability of SAP ui5 application routing URL

Richview trvstyle liststyle list style (bullet number)

Go language web development series 27: Gin framework: using gin swagger to implement interface documents
随机推荐
Mobile phones and computers can be used, whole people, spoof code connections, "won't you Baidu for a while" teach you to use Baidu
MapReduce implements matrix multiplication - implementation code
Internet of things completion -- (stm32f407 connects to cloud platform detection data)
[how to earn a million passive income]
JS convert pseudo array to array
RichView TRVStyle ListStyle 列表样式(项目符号编号)
Kivy教程之 如何自动载入kv文件
物联网毕设 --(STM32f407连接云平台检测数据)
Logback log sorting
Static linked list (subscript of array instead of pointer)
[how to solve FAT32 when the computer is inserted into the U disk or the memory card display cannot be formatted]
Richview trvstyle liststyle list style (bullet number)
Spark实战1:单节点本地模式搭建Spark运行环境
Disruptor -- a high concurrency and high performance queue framework for processing tens of millions of levels
KEIL5出现中文字体乱码的解决方法
Realize the recognition and training of CNN images, and process the cifar10 data set and other methods through the tensorflow framework
常见的几种最优化方法Matlab原理和深度分析
The shadow of the object at the edge of the untiy world flickers, and the shadow of the object near the far point is normal
The reasons why there are so many programming languages in programming internal skills
The shortage of graphics cards finally came to an end: 3070ti for more than 4000 yuan, 2000 yuan cheaper than the original price, and 3090ti