1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 07:50:54 +00:00

add mis function NSHandler

This commit is contained in:
astaxie 2016-03-11 09:21:13 +08:00
parent 571f9b4b65
commit 22196d7841

View File

@ -388,3 +388,10 @@ func NSNamespace(prefix string, params ...LinkNamespace) LinkNamespace {
ns.Namespace(n) ns.Namespace(n)
} }
} }
// NSHandler add handler
func NSHandler(rootpath string, h http.Handler) LinkNamespace {
return func(ns *Namespace) {
ns.Handler(rootpath, h)
}
}