From a9369e78edb1c3ebb8f00c5aa855c01910aa2493 Mon Sep 17 00:00:00 2001 From: codeHauler-1 <50894822+codeHauler-1@users.noreply.github.com> Date: Sat, 4 Dec 2021 20:29:52 +0800 Subject: [PATCH] Update tree.go --- tree.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tree.go b/tree.go index fb0a5935..4eb4de31 100644 --- a/tree.go +++ b/tree.go @@ -48,6 +48,16 @@ func (ps Params) ByName(name string) (va string) { return } +//IsEmpty check the value of the param +func (ps Params) IsEmpty() bool { + for _, entry := range ps { + if len(entry.Value) < 1 { + return false + } + } + return true +} + type methodTree struct { method string root *node