From d234d8cc8febc3e6e86a9014361bfcdb30f6f4f9 Mon Sep 17 00:00:00 2001 From: networkop Date: Fri, 14 Jan 2022 11:06:45 +0000 Subject: [PATCH] Initialising all lookupFuncs to noop --- gateway.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gateway.go b/gateway.go index 30493af..9717565 100644 --- a/gateway.go +++ b/gateway.go @@ -19,15 +19,20 @@ type resourceWithIndex struct { lookup lookupFunc } +var noop lookupFunc = func([]string) (result []net.IP) { return } + var orderedResources = []*resourceWithIndex{ { - name: "HTTPRoute", + name: "HTTPRoute", + lookup: noop, }, { - name: "Ingress", + name: "Ingress", + lookup: noop, }, { - name: "Service", + name: "Service", + lookup: noop, }, }