mirror of
https://github.com/go-micro/go-micro.git
synced 2025-07-12 22:41:07 +02:00
chore: replace for loop with call to copy (#2678)
This commit is contained in:
@ -23,9 +23,7 @@ type Option func(o *Options)
|
|||||||
func Stores(stores ...store.Store) Option {
|
func Stores(stores ...store.Store) Option {
|
||||||
return func(o *Options) {
|
return func(o *Options) {
|
||||||
o.Stores = make([]store.Store, len(stores))
|
o.Stores = make([]store.Store, len(stores))
|
||||||
for i, s := range stores {
|
copy(o.Stores, stores)
|
||||||
o.Stores[i] = s
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user