From 673d0a65ba5e2bb2a9c828c79fb1e41f6bddc953 Mon Sep 17 00:00:00 2001 From: Gregory Boddin Date: Sun, 23 May 2021 18:05:37 +0200 Subject: [PATCH] [improve] Added webrequest helper to match multiple --- l9plugin.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/l9plugin.go b/l9plugin.go index d19a248..c57a06c 100644 --- a/l9plugin.go +++ b/l9plugin.go @@ -132,3 +132,12 @@ func (request *WebPluginRequest) GetHash() string { func (request *WebPluginRequest) Equal(testRequest WebPluginRequest) bool { return request.GetHash() == testRequest.GetHash() } + +func (request *WebPluginRequest) EqualAny(testRequests []WebPluginRequest) bool { + for _, testRequest := range testRequests { + if request.GetHash() == testRequest.GetHash() { + return true + } + } + return false +} \ No newline at end of file