From 22196d78415fff13189bffc387c2545f4d9bf377 Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 11 Mar 2016 09:21:13 +0800 Subject: [PATCH] add mis function NSHandler --- namespace.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/namespace.go b/namespace.go index 0dfdd7af..4007d44c 100644 --- a/namespace.go +++ b/namespace.go @@ -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) + } +}