mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
preallocated slices (#917)
This commit is contained in:
committed by
Asim Aslam
parent
4a694c9d02
commit
f67c5e779f
@ -139,7 +139,7 @@ func (k *kubernetes) Update(s *runtime.Service) error {
|
||||
func (k *kubernetes) List() ([]*runtime.Service, error) {
|
||||
// TODO: this should list the k8s deployments
|
||||
// but for now we return in-memory tracked services
|
||||
var services []*runtime.Service
|
||||
services := make([]*runtime.Service, 0, len(k.services))
|
||||
k.RLock()
|
||||
defer k.RUnlock()
|
||||
|
||||
|
Reference in New Issue
Block a user