Update tree.go

This commit is contained in:
codeHauler-1 2021-12-04 20:29:52 +08:00 committed by GitHub
parent 3a6f18f32f
commit a9369e78ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
tree.go
View File

@ -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