From a0d908528ed968d358c7e5c907a322ca2233f1dd Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 27 Jun 2018 15:16:34 +0800 Subject: [PATCH] - make the root / pingable. --- routers/router.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/router.go b/routers/router.go index 969a524ce..5a2e515af 100644 --- a/routers/router.go +++ b/routers/router.go @@ -11,6 +11,7 @@ import ( "git.rosy.net.cn/jx-callback/controllers" "github.com/astaxie/beego" + beecontext "github.com/astaxie/beego/context" ) func init() { @@ -35,4 +36,7 @@ func init() { ), ) beego.AddNamespace(nsJd, nsElm, nsMtps, nsDada) + beego.Get("/", func(ctx *beecontext.Context) { + ctx.WriteString("pong") + }) }