fix: resolve copyloopvar issues

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2025-11-03 15:33:20 +00:00
parent 3ad3fcdce9
commit f498f2e882
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E
5 changed files with 2 additions and 8 deletions

View file

@ -127,7 +127,6 @@ func TestChecksStatus_SummarisingCheckRuns(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
@ -180,7 +179,6 @@ func TestChecksStatus_SummarisingStatusContexts(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

View file

@ -83,7 +83,6 @@ func TestJoin(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
joinedPath, err := tt.base.Join(tt.elems...)

View file

@ -329,7 +329,6 @@ func (a *App) ForwardPorts(ctx context.Context, selector *CodespaceSelector, por
// them at the first failure, including cancellation of the context.
group, ctx := errgroup.WithContext(ctx)
for _, pair := range portPairs {
pair := pair
group.Go(func() error {
listen, _, err := codespaces.ListenTCP(pair.local, true)
if err != nil {

View file

@ -584,9 +584,8 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts sshOptions) (err erro
continue
}
cs := cs
wg.Add(1)
go func() {
go func(cs *api.Codespace) {
result := sshResult{}
defer wg.Done()
@ -622,7 +621,7 @@ func (a *App) printOpenSSHConfig(ctx context.Context, opts sshOptions) (err erro
result.codespace = cs
sshUsers <- result
}()
}(cs)
}
go func() {

View file

@ -60,7 +60,6 @@ func TestCmdHelpTopic(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()