add mis function NSHandler

This commit is contained in:
astaxie 2016-03-11 09:21:13 +08:00
parent 571f9b4b65
commit 22196d7841
1 changed files with 7 additions and 0 deletions

View File

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