fix random selector

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-11-29 17:30:54 +03:00
parent 0d93b2c31c
commit 8d6eb34aee

View File

@ -22,7 +22,7 @@ func (r *random) Select(routes []string, opts ...selector.SelectOption) (selecto
}
// select a random route from the slice
return routes[rand.Intn(len(routes)-1)]
return routes[rand.Intn(len(routes))]
}, nil
}