From 34b78537c99f8caf1dda1bea67b98478c1915152 Mon Sep 17 00:00:00 2001 From: Tyler Lloyd Date: Mon, 8 Nov 2021 09:38:38 -0500 Subject: [PATCH] changed return type to IPFamily Signed-off-by: Tyler Lloyd --- pkg/goldpinger/k8s.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/goldpinger/k8s.go b/pkg/goldpinger/k8s.go index 569bfea..540228c 100644 --- a/pkg/goldpinger/k8s.go +++ b/pkg/goldpinger/k8s.go @@ -119,14 +119,14 @@ func GetAllPods() map[string]*GoldpingerPod { // TODO update to check all config versions to support dual-stack pinging. func ipMatchesConfig(ip string) bool { ipFamily := getIPFamily(ip) - return GoldpingerConfig.IPVersions[0] == ipFamily + return GoldpingerConfig.IPVersions[0] == string(ipFamily) } // getIPFamily returns the IP family of the input IP. // Possible values are 4 and 6. -func getIPFamily(ip string) string { +func getIPFamily(ip string) k8snet.IPFamily { if k8snet.IsIPv4String(ip) { - return string(k8snet.IPv4) + return k8snet.IPv4 } if k8snet.IsIPv6String(ip) { return k8snet.IPv6