wrapper/select/version: fix panic
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
7dc172a825
commit
d24e1d19e4
@ -29,6 +29,11 @@ func (w *latestVersionWrapper) Call(ctx context.Context, req client.Request, rsp
|
|||||||
|
|
||||||
func filterLatestVersion() selector.Filter {
|
func filterLatestVersion() selector.Filter {
|
||||||
return func(svcsOld []*registry.Service) []*registry.Service {
|
return func(svcsOld []*registry.Service) []*registry.Service {
|
||||||
|
|
||||||
|
if len(svcsOld) <= 1 {
|
||||||
|
return svcsOld
|
||||||
|
}
|
||||||
|
|
||||||
var svcsNew []*registry.Service
|
var svcsNew []*registry.Service
|
||||||
versions := make([]string, len(svcsOld))
|
versions := make([]string, len(svcsOld))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user