1 Star 0 Fork 0

xiaoshengfu / xMVC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 302 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoshengfu 提交于 2021-03-21 10:54 . first commit
package main
import (
"net/http"
"xmvc"
)
func main() {
r := xmvc.Default()
r.GET("/", func(c *xmvc.Context) {
c.String(http.StatusOK, "Hello xMVC\n")
})
r.GET("/panic", func(c *xmvc.Context) {
names := []string{"sfuxiao"}
c.String(http.StatusOK, names[100])
})
_ = r.Run(":8080")
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/xiaoshengfu/x-mvc.git
git@gitee.com:xiaoshengfu/x-mvc.git
xiaoshengfu
x-mvc
xMVC
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891