当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
17 Star 35 Fork 0

vz / ego
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
hello.go 478 Bytes
一键复制 编辑 原始数据 按行查看 历史
vz 提交于 2017-08-16 19:20 . fix to http.StatusOK
package hello
import (
"net/http"
"github.com/go-ego/ego"
)
// This function's name is a must. App engine uses it to drive the requests properly.
func init() {
// Starts a new ego instance with no middle-ware
r := ego.New()
// Define your handlers
r.GET("/", func(c *ego.Context) {
c.String(http.StatusOK, "Hello World!")
})
r.GET("/ping", func(c *ego.Context) {
c.String(http.StatusOK, "pong")
})
// Handle all requests using net/http
http.Handle("/", r)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/veni0/ego.git
git@gitee.com:veni0/ego.git
veni0
ego
ego
263eb77d34e2

搜索帮助

344bd9b3 5694891 D2dac590 5694891