Avoid returning a nil slice

This commit is contained in:
freddygv 2021-04-14 10:52:05 -06:00
parent 7fd4c569ce
commit 2ff8b9f2f5
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}