当前位置:网站首页>gin--hello
gin--hello
2022-04-23 01:15:00 【Kuafu pursues dreams@】
package main
import "github.com/gin-gonic/gin"
func main() {
engine := gin.Default()
engine.GET("/hello", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "welcome golang gin!",
"author": "ht",
})
})
engine.Run(":8899")
}
// result :
/*
{
"author": "ht",
"message": "welcome golang gin!"
}
*/

版权声明
本文为[Kuafu pursues dreams@]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230113266424.html
边栏推荐
- [Ethernet switching security] - switch flow control / DHCP snooping / IP source guard
- 12 years of testing predecessors give you some suggestions for learning software testing
- Interview eight part essay (disorderly order, no classification)
- 光猫超级帐号密码,重置光猫获取超级帐号密码
- Enterprises choose to privatize the deployment of IM instant messaging software to fully protect information security!
- Research and application of power monitoring system for employee apartment building construction project
- SynchronousQueue 源码解析
- Interface automation session authentication solution
- [Blue Bridge Cup real question 18] scratch addition multiple-choice question youth group scratch Blue Bridge Cup real question and answer explanation
- 世界读书日:18本豆瓣评分9.0以上的IT书值得收藏
猜你喜欢
随机推荐
曦智科技沈亦晨入选2022达沃斯世界经济论坛“全球青年领袖”
[Blue Bridge Cup real question 18] scratch addition multiple-choice question youth group scratch Blue Bridge Cup real question and answer explanation
【以太网交换安全】--- 交换机流量控制/DHCP Snooping/IP Source Guard
Branch and loop statements
What is October 24th? Why are there no senior programmers in China in their fifties and sixties, while foreigners,,, Yu Nianyu Hui take you to celebrate the 1024 programmer Festival
What happens when you run the NPM install command?
What kind of project is suitable for automated testing?
Is 2022 software testing easy to learn? How long will it take? (learning roadmap attached)
Alibaba cloud container & Service Grid product technology trends (202203)
Three technical solutions of ant group were selected as "typical solutions for information technology application and innovation in 2021"
Application of acrel-3200 remote prepaid electric energy management system in Fuzhou Wanbao Industrial Park
光猫超级帐号密码,重置光猫获取超级帐号密码
Innovative practice of short video content understanding and generation technology in meituan
智能照明控制系统在医院的设计与应用
Can you really cross with a k-fold? Thoughts on k-fold intersection
简单聊聊Ruby
[HCTF 2018]admin
gin -get请求的小示例2-Handle处理post请求
How to become a real digital enterprise? Ruijie network releases the digital force awakening plan
What is the lifecycle of automated testing?
![[actf2020 freshman competition]](/img/0c/4c06112383c0b225c987a499b622a9.png)







