1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00

chore: replace for loop with call to copy (#2678)

This commit is contained in:
guangwu 2023-11-30 19:18:05 +08:00 committed by GitHub
parent 68c026c5d8
commit 252385e39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,9 +23,7 @@ type Option func(o *Options)
func Stores(stores ...store.Store) Option {
return func(o *Options) {
o.Stores = make([]store.Store, len(stores))
for i, s := range stores {
o.Stores[i] = s
}
copy(o.Stores, stores)
}
}