Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2036d8

Browse files
Claudeclaude
Claude
andcommitted
fix: update Go syntax for 1.24.1 compatibility
- Fix for range loops over integer constants- Fix import aliases🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
1 parent78a26af commitc2036d8

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

‎agent/agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ func TestAgent_Dial(t *testing.T) {
19851985

19861986
gofunc() {
19871987
deferclose(done)
1988-
forrange2 {
1988+
fori:=0;i<2;i++ {
19891989
c,err:=l.Accept()
19901990
ifassert.NoError(t,err,"accept connection") {
19911991
testAccept(ctx,t,c)

‎coderd/tracing/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"context"
77

88
"github.com/go-logr/logr"
9-
"github.com/hashicorp/go-multierror"
9+
multierror"github.com/hashicorp/go-multierror"
1010
"go.opentelemetry.io/otel"
1111
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
1212
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"

‎coderd/tracing/httpmw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"net/http"
77

8-
"github.com/go-chi/chi/v5"
8+
chi"github.com/go-chi/chi/v5"
99
"go.opentelemetry.io/otel"
1010
"go.opentelemetry.io/otel/propagation"
1111
semconv"go.opentelemetry.io/otel/semconv/v1.14.0"

‎enterprise/coderd/workspaces_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
12181218
// For each day of the week (Monday-Sunday)
12191219
// We iterate through each day of the week to ensure the behavior of each
12201220
// day of the week is as expected.
1221-
forrange7 {
1221+
fori:=0;i<7;i++ {
12221222
next=sched.Next(next)
12231223

12241224
clock.Set(next)

‎tailnet/controllers_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func TestTunnelSrcCoordController_AddDestination(t *testing.T) {
144144
}()
145145

146146
// THEN: Controller sends AddTunnel for the destinations
147-
fori:=range2 {
147+
fori:=0;i<2;i++ {
148148
b0:=byte(i+1)
149149
call:=testutil.RequireRecvCtx(ctx,t,client1.reqs)
150150
require.Equal(t,b0,call.req.GetAddTunnel().GetId()[0])
@@ -171,7 +171,7 @@ func TestTunnelSrcCoordController_AddDestination(t *testing.T) {
171171

172172
// THEN: should immediately send both destinations
173173
vardests []byte
174-
forrange2 {
174+
fori:=0;i<2;i++ {
175175
call:=testutil.RequireRecvCtx(ctx,t,client2.reqs)
176176
dests=append(dests,call.req.GetAddTunnel().GetId()[0])
177177
testutil.RequireSendCtx(ctx,t,call.err,nil)
@@ -272,7 +272,7 @@ func TestTunnelSrcCoordController_RemoveDestination_Error(t *testing.T) {
272272
gofunc() {
273273
cws<-uut.New(client1)
274274
}()
275-
forrange3 {
275+
fori:=0;i<3;i++ {
276276
call:=testutil.RequireRecvCtx(ctx,t,client1.reqs)
277277
testutil.RequireSendCtx(ctx,t,call.err,nil)
278278
}
@@ -329,7 +329,7 @@ func TestTunnelSrcCoordController_Sync(t *testing.T) {
329329
gofunc() {
330330
cws<-uut.New(client1)
331331
}()
332-
forrange2 {
332+
fori:=0;i<2;i++ {
333333
call:=testutil.RequireRecvCtx(ctx,t,client1.reqs)
334334
testutil.RequireSendCtx(ctx,t,call.err,nil)
335335
}
@@ -1548,7 +1548,7 @@ func TestTunnelAllWorkspaceUpdatesController_Initial(t *testing.T) {
15481548

15491549
// This should trigger AddTunnel for each agent
15501550
varadds []uuid.UUID
1551-
forrange3 {
1551+
fori:=0;i<3;i++ {
15521552
coordCall:=testutil.RequireRecvCtx(ctx,t,coordC.reqs)
15531553
adds=append(adds,uuid.Must(uuid.FromBytes(coordCall.req.GetAddTunnel().GetId())))
15541554
testutil.RequireSendCtx(ctx,t,coordCall.err,nil)

‎tailnet/resume_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/go-jose/go-jose/v4"
7+
jose"github.com/go-jose/go-jose/v4"
88
"github.com/go-jose/go-jose/v4/jwt"
99
"github.com/google/uuid"
1010
"github.com/stretchr/testify/require"

‎vpn/pipe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"io"
55
"os"
66

7-
"github.com/hashicorp/go-multierror"
7+
multierror"github.com/hashicorp/go-multierror"
88
"golang.org/x/xerrors"
99
)
1010

‎vpn/tunnel_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func TestTunnel_sendAgentUpdate(t *testing.T) {
412412

413413
// `sendAgentUpdate` produces the same PeerUpdate message until an agent
414414
// update is received
415-
forrange2 {
415+
fori:=0;i<2;i++ {
416416
mClock.AdvanceNext()
417417
// Then: the tunnel sends a PeerUpdate message of agent upserts,
418418
// with the last handshake and latency set

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp