当前位置:网站首页>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
边栏推荐
- Mastering the cypress command line options is the basis for truly mastering cypress
- Brief analysis of tensorboard visual processing cases
- Go language unit test 4: go language uses gomonkey to test functions or methods
- Static linked list (subscript of array instead of pointer)
- Bidirectional linked list (we only need to pay attention to insert and delete functions)
- JVM系列——概述,程序计数器day1-1
- 软件测试工作那么难找,只有外包offer,我该去么?
- Internet of things completion -- (stm32f407 connects to cloud platform detection data)
- 【556. 下一个更大元素 III】
- There is nothing new under the sun. Can the meta universe go higher?
猜你喜欢
User and group command exercises
[today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay
Universal dividend source code, supports the dividend of any B on the BSC
[redis] cache warm-up, cache avalanche and cache breakdown
Unity EmbeddedBrowser浏览器插件事件通讯
Several common optimization methods matlab principle and depth analysis
SQL Injection (POST/Select)
Go language unit test 5: go language uses go sqlmock and Gorm to do database query mock
Richview trvstyle liststyle list style (bullet number)
SQL Injection (GET/Search)
随机推荐
Go language unit test 5: go language uses go sqlmock and Gorm to do database query mock
Road construction issues
AI scores 81 in high scores. Netizens: AI model can't avoid "internal examination"!
Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)
物联网毕设 --(STM32f407连接云平台检测数据)
Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
[how to solve FAT32 when the computer is inserted into the U disk or the memory card display cannot be formatted]
Unity embeddedbrowser browser plug-in event communication
Swiftui development experience: the five most powerful principles that a programmer needs to master
Start signing up CCF C ³- [email protected] chianxin: Perspective of Russian Ukrainian cyber war - Security confrontation and sanctions g
Logback log sorting
Anan's doubts
Windos creates Cordova prompt because running scripts is prohibited on this system
常见的几种最优化方法Matlab原理和深度分析
Can newly graduated European college students get an offer from a major Internet company in the United States?
Bidirectional linked list (we only need to pay attention to insert and delete functions)
Logseq evaluation: advantages, disadvantages, evaluation, learning tutorial
研发团队资源成本优化实践
The latest BSC can pay dividends. Any B usdt Shib eth dividend destruction marketing can
Realize the recognition and training of CNN images, and process the cifar10 data set and other methods through the tensorflow framework