2 Star 3 Fork 1

vendors/gin-gonic-gin

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
hello.go 460 Bytes
一键复制 编辑 原始数据 按行查看 历史
Bo-Yi Wu 提交于 2016-02-17 10:45 +08:00 . fix: example format.
package hello
import (
"github.com/gin-gonic/gin"
"net/http"
)
// This function's name is a must. App Engine uses it to drive the requests properly.
func init() {
// Starts a new Gin instance with no middle-ware
r := gin.New()
// Define your handlers
r.GET("/", func(c *gin.Context) {
c.String(200, "Hello World!")
})
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
})
// Handle all requests using net/http
http.Handle("/", r)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vendors/gin-gonic-gin.git
git@gitee.com:vendors/gin-gonic-gin.git
vendors
gin-gonic-gin
gin-gonic-gin
v1.1.4

搜索帮助