From 2ff8b9f2f5ec2f39bf406ba3364745fbe462be9e Mon Sep 17 00:00:00 2001 From: freddygv Date: Wed, 14 Apr 2021 10:52:05 -0600 Subject: [PATCH] Avoid returning a nil slice --- agent/consul/state/intention.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/consul/state/intention.go b/agent/consul/state/intention.go index b2fea127e..2c0b1e0a5 100644 --- a/agent/consul/state/intention.go +++ b/agent/consul/state/intention.go @@ -955,7 +955,7 @@ func (s *Store) IntentionTopology(ws memdb.WatchSet, return 0, nil, fmt.Errorf("failed to fetch %s for %s: %v", requested, target.String(), err) } - var resp structs.ServiceList + resp := make(structs.ServiceList, 0) for _, svc := range services { resp = append(resp, svc.Name) }