Skip to content

Commit

Permalink
refactor: Removing useless shadowing
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Apr 3, 2024
1 parent cd62601 commit 4de0933
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
16 changes: 0 additions & 16 deletions flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ func TestString(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("String", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -191,8 +189,6 @@ func TestInt(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Int", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -244,8 +240,6 @@ func TestInt64(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Int64", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -297,8 +291,6 @@ func TestUInt(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("UInt", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -350,8 +342,6 @@ func TestUInt64(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("UInt64", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -403,8 +393,6 @@ func TestFloat64(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Float64", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -456,8 +444,6 @@ func TestBool(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Bool", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -509,8 +495,6 @@ func TestDuration(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Duration", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down
4 changes: 0 additions & 4 deletions slices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ func TestStringSlice(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("StringSlice", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down Expand Up @@ -162,8 +160,6 @@ func TestFloat64Slice(t *testing.T) {
}

for intention, testCase := range cases {
intention, testCase := intention, testCase

t.Run(intention, func(t *testing.T) {
fs := flag.NewFlagSet("Float64Slice", flag.ContinueOnError)
fs.Usage = flags.Usage(fs)
Expand Down

0 comments on commit 4de0933

Please sign in to comment.