You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-03 00:57:43 +02:00
refactor: remove unneeded in Go 1.22 loop var copy (#4856)
The PR cleans up unnecessary loop variable copying and enables the [`copyloopvar`](https://golangci-lint.run/usage/linters/#copyloopvar) linter for detecting this redundant variable copying. #### Additional notes After the project upgraded to Go version 1.22 in #4779, copying variables inside a `for` loop became unnecessary. See this [blog post](https://go.dev/blog/loopvar-preview) for a detailed explanation. The `copyloopvar` linter is only available from `golangci-lint` v1.57 onwards, so we also need to update this tool.
This commit is contained in:
@ -57,7 +57,6 @@ func (Pipe) Publish(ctx *context.Context) error {
|
||||
g := semerrgroup.New(ctx.Parallelism)
|
||||
skips := pipe.SkipMemento{}
|
||||
for _, conf := range ctx.Config.Blobs {
|
||||
conf := conf
|
||||
g.Go(func() error {
|
||||
b, err := tmpl.New(ctx).Bool(conf.Disable)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user