[#1341] .golangci.yml: Replace exportloopref with copyloopvar
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m56s
DCO action / DCO (pull_request) Successful in 2m15s
Vulncheck / Vulncheck (pull_request) Successful in 2m24s
Tests and linters / Tests (1.22) (pull_request) Successful in 2m54s
Build / Build Components (1.22) (pull_request) Successful in 2m53s
Build / Build Components (1.23) (pull_request) Successful in 2m52s
Tests and linters / Lint (pull_request) Successful in 3m24s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m3s
Tests and linters / Tests (1.23) (pull_request) Successful in 3m22s
Tests and linters / Staticcheck (pull_request) Successful in 3m25s
Tests and linters / gopls check (pull_request) Successful in 4m0s
Tests and linters / Tests with -race (pull_request) Successful in 4m12s

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:
Evgenii Stratonikov 2024-08-28 14:45:57 +03:00
parent 8fd26595a8
commit f8c6e05e1c
17 changed files with 2 additions and 29 deletions

View file

@ -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()]