cmd/gitannex: Drop var rebindings now that we have go1.23

This commit is contained in:
Dan McArdle 2025-02-28 14:21:16 -05:00 committed by Nick Craig-Wood
parent 964c6204dd
commit db9205b298
1 changed files with 0 additions and 7 deletions

View File

@ -140,7 +140,6 @@ var messageParserTestCases = []messageParserTestCase{
"OneLongFinalParameter", "OneLongFinalParameter",
func(t *testing.T) { func(t *testing.T) {
for _, lineEnding := range []string{"", "\n", "\r", "\r\n", "\n\r"} { for _, lineEnding := range []string{"", "\n", "\r", "\r\n", "\n\r"} {
lineEnding := lineEnding
testName := fmt.Sprintf("lineEnding%x", lineEnding) testName := fmt.Sprintf("lineEnding%x", lineEnding)
t.Run(testName, func(t *testing.T) { t.Run(testName, func(t *testing.T) {
@ -184,7 +183,6 @@ var messageParserTestCases = []messageParserTestCase{
func TestMessageParser(t *testing.T) { func TestMessageParser(t *testing.T) {
for _, testCase := range messageParserTestCases { for _, testCase := range messageParserTestCases {
testCase := testCase
t.Run(testCase.label, func(t *testing.T) { t.Run(testCase.label, func(t *testing.T) {
t.Parallel() t.Parallel()
testCase.testFunc(t) testCase.testFunc(t)
@ -1171,11 +1169,6 @@ func TestMain(m *testing.M) {
func TestGitAnnexFstestBackendCases(t *testing.T) { func TestGitAnnexFstestBackendCases(t *testing.T) {
for _, testCase := range fstestTestCases { for _, testCase := range fstestTestCases {
// TODO: Remove this when rclone requires a Go version >= 1.22. Future
// versions of Go fix the semantics of capturing a range variable.
// https://go.dev/blog/loopvar-preview
testCase := testCase
t.Run(testCase.label, func(t *testing.T) { t.Run(testCase.label, func(t *testing.T) {
r := fstest.NewRun(t) r := fstest.NewRun(t)
t.Cleanup(func() { r.Finalise() }) t.Cleanup(func() { r.Finalise() })