From 886d7438fdbd493b4c421e0707daa11bfedb720b Mon Sep 17 00:00:00 2001 From: Tarun Koyalwar Date: Thu, 29 Jun 2023 00:50:26 +0530 Subject: [PATCH] add len method to orderedMap --- url/orderedparams.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/url/orderedparams.go b/url/orderedparams.go index 7a38e5c..56a17f9 100644 --- a/url/orderedparams.go +++ b/url/orderedparams.go @@ -22,6 +22,11 @@ func NewOrderedParams() *OrderedParams { } } +// IsEmpty checks if the OrderedParams is empty +func (o *OrderedParams) IsEmpty() bool { + return o.om.IsEmpty() +} + // Add Parameters to store func (o *OrderedParams) Add(key string, value ...string) { if arr, ok := o.om.Get(key); ok && len(arr) > 0 {