From 6e400ad0e417860647699a0af8391d8468804f30 Mon Sep 17 00:00:00 2001 From: Gregory Boddin Date: Mon, 7 Dec 2020 15:46:17 +0100 Subject: [PATCH] [alpha-fix] Add helpers for go --- l9helper.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 l9helper.go diff --git a/l9helper.go b/l9helper.go new file mode 100644 index 0000000..ccf2c2a --- /dev/null +++ b/l9helper.go @@ -0,0 +1,19 @@ +package l9format + +func (event *L9Event) HasTransport(transport string) bool { + for _, check := range event.Transports { + if check == transport { + return true + } + } + return false +} + +func (event *L9Event) HasSource(source string) bool { + for _, check := range event.EventPipeline { + if check == source { + return true + } + } + return false +} \ No newline at end of file