forked from TrueCloudLab/frostfs-node
[#1341] .golangci.yml: Replace exportloopref with copyloopvar
exportloopref is deprecated. gopatch: ``` @@ var index, value identifier var slice expression @@ for index, value := range slice { ... -value := value ... } @@ var index, value identifier var slice expression @@ for index, value := range slice { ... -index := index ... } @@ var value identifier var channel expression @@ for value := range channel { ... -value := value ... } ``` Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
7e97df4878
commit
03976c6ed5
17 changed files with 2 additions and 29 deletions
|
@ -82,8 +82,6 @@ func (e *StorageEngine) Init(ctx context.Context) error {
|
|||
}
|
||||
|
||||
for id, sh := range e.shards {
|
||||
id := id
|
||||
sh := sh
|
||||
eg.Go(func() error {
|
||||
if err := sh.Init(ctx); err != nil {
|
||||
errCh <- shardInitError{
|
||||
|
|
|
@ -367,7 +367,6 @@ func (e *StorageEngine) closeShards(deletedShards []hashedShard) error {
|
|||
var multiErrGuard sync.Mutex
|
||||
var eg errgroup.Group
|
||||
for _, sh := range deletedShards {
|
||||
sh := sh
|
||||
eg.Go(func() error {
|
||||
err := sh.SetMode(mode.Disabled)
|
||||
if err != nil {
|
||||
|
|
|
@ -102,7 +102,6 @@ func (e *StorageEngine) SealWriteCache(ctx context.Context, prm SealWriteCachePr
|
|||
|
||||
eg, egCtx := errgroup.WithContext(ctx)
|
||||
for _, shardID := range prm.ShardIDs {
|
||||
shardID := shardID
|
||||
eg.Go(func() error {
|
||||
e.mtx.RLock()
|
||||
sh, ok := e.shards[shardID.String()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue