build: remove x := x made unnecessary by the new semantics of loops in go1.22
Signed-off-by: russcoss <russcoss@outlook.com>
This commit is contained in:
@@ -145,7 +145,6 @@ func rcProviders(ctx context.Context, in rc.Params) (out rc.Params, err error) {
|
||||
|
||||
func init() {
|
||||
for _, name := range []string{"create", "update", "password"} {
|
||||
name := name
|
||||
extraHelp := ""
|
||||
if name == "create" {
|
||||
extraHelp = "- type - type of the new remote\n"
|
||||
|
||||
@@ -222,7 +222,6 @@ func (lh *listHelper) send(max int) (err error) {
|
||||
g, gCtx := errgroup.WithContext(lh.ls.ctx)
|
||||
g.SetLimit(lh.ls.ci.Checkers)
|
||||
for i, key := range lh.keys {
|
||||
i, key := i, key // can remove when go1.22 is minimum version
|
||||
g.Go(func() error {
|
||||
lh.entries[i], lh.errs[i] = lh.ls.keyToEntry(gCtx, key)
|
||||
return nil
|
||||
|
||||
@@ -160,7 +160,6 @@ func rcAbout(ctx context.Context, in rc.Params) (out rc.Params, err error) {
|
||||
|
||||
func init() {
|
||||
for _, copy := range []bool{false, true} {
|
||||
copy := copy
|
||||
name := "Move"
|
||||
if copy {
|
||||
name = "Copy"
|
||||
@@ -217,7 +216,6 @@ func init() {
|
||||
{name: "settier", title: "Changes storage tier or class on all files in the path", noRemote: true},
|
||||
{name: "settierfile", title: "Changes storage tier or class on the single file pointed to", noCommand: true},
|
||||
} {
|
||||
op := op
|
||||
var remote, command string
|
||||
if !op.noRemote {
|
||||
remote = "- remote - a path within that remote e.g. \"dir\"\n"
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
func init() {
|
||||
for _, name := range []string{"sync", "copy", "move"} {
|
||||
name := name
|
||||
moveHelp := ""
|
||||
if name == "move" {
|
||||
moveHelp = "- deleteEmptySrcDirs - delete empty src directories if set\n"
|
||||
|
||||
Reference in New Issue
Block a user