Skip to content

Commit 22e781e

Browse files
authored
chore: add /v2 to import module path (coder#9072)
* chore: add /v2 to import module path go mod requires semantic versioning with versions greater than 1.x This was a mechanical update by running: ``` go install github.com/marwan-at-work/mod/cmd/mod@latest mod upgrade ``` Migrate generated files to import /v2 * Fix gen
1 parent 0d40e7f commit 22e781e

File tree

626 files changed

+5834
-5834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

626 files changed

+5834
-5834
lines changed

.swaggo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Replace all NullTime with string
2-
replace github.com/coder/coder/codersdk.NullTime string
2+
replace github.com/coder/coder/v2/codersdk.NullTime string
33
// Prevent swaggo from rendering enums for time.Duration
44
replace time.Duration int64
55
// Do not expose "echo" provider
6-
replace github.com/coder/coder/codersdk.ProvisionerType string
6+
replace github.com/coder/coder/v2/codersdk.ProvisionerType string
77
// Do not render netip.Addr
88
replace netip.Addr string

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ provisionerd/proto/provisionerd.pb.go: provisionerd/proto/provisionerd.proto
538538
site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go')
539539
go run scripts/apitypings/main.go > site/src/api/typesGenerated.ts
540540
cd site
541-
pnpm run format:types
541+
pnpm run format:types ./src/api/typesGenerated.ts
542542

543543
site/e2e/provisionerGenerated.ts:
544544
cd site

agent/agent.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ import (
3434
"tailscale.com/types/netlogtype"
3535

3636
"cdr.dev/slog"
37-
"github.com/coder/coder/agent/agentssh"
38-
"github.com/coder/coder/agent/reconnectingpty"
39-
"github.com/coder/coder/buildinfo"
40-
"github.com/coder/coder/coderd/database"
41-
"github.com/coder/coder/coderd/gitauth"
42-
"github.com/coder/coder/codersdk"
43-
"github.com/coder/coder/codersdk/agentsdk"
44-
"github.com/coder/coder/tailnet"
37+
"github.com/coder/coder/v2/agent/agentssh"
38+
"github.com/coder/coder/v2/agent/reconnectingpty"
39+
"github.com/coder/coder/v2/buildinfo"
40+
"github.com/coder/coder/v2/coderd/database"
41+
"github.com/coder/coder/v2/coderd/gitauth"
42+
"github.com/coder/coder/v2/codersdk"
43+
"github.com/coder/coder/v2/codersdk/agentsdk"
44+
"github.com/coder/coder/v2/tailnet"
4545
"github.com/coder/retry"
4646
)
4747

agent/agent_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ import (
4242

4343
"cdr.dev/slog"
4444
"cdr.dev/slog/sloggers/slogtest"
45-
"github.com/coder/coder/agent"
46-
"github.com/coder/coder/agent/agentssh"
47-
"github.com/coder/coder/agent/agenttest"
48-
"github.com/coder/coder/coderd/httpapi"
49-
"github.com/coder/coder/codersdk"
50-
"github.com/coder/coder/codersdk/agentsdk"
51-
"github.com/coder/coder/pty"
52-
"github.com/coder/coder/pty/ptytest"
53-
"github.com/coder/coder/tailnet"
54-
"github.com/coder/coder/tailnet/tailnettest"
55-
"github.com/coder/coder/testutil"
45+
"github.com/coder/coder/v2/agent"
46+
"github.com/coder/coder/v2/agent/agentssh"
47+
"github.com/coder/coder/v2/agent/agenttest"
48+
"github.com/coder/coder/v2/coderd/httpapi"
49+
"github.com/coder/coder/v2/codersdk"
50+
"github.com/coder/coder/v2/codersdk/agentsdk"
51+
"github.com/coder/coder/v2/pty"
52+
"github.com/coder/coder/v2/pty/ptytest"
53+
"github.com/coder/coder/v2/tailnet"
54+
"github.com/coder/coder/v2/tailnet/tailnettest"
55+
"github.com/coder/coder/v2/testutil"
5656
)
5757

5858
func TestMain(m *testing.M) {

agent/agentssh/agentssh.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import (
2828

2929
"cdr.dev/slog"
3030

31-
"github.com/coder/coder/agent/usershell"
32-
"github.com/coder/coder/codersdk"
33-
"github.com/coder/coder/codersdk/agentsdk"
34-
"github.com/coder/coder/pty"
31+
"github.com/coder/coder/v2/agent/usershell"
32+
"github.com/coder/coder/v2/codersdk"
33+
"github.com/coder/coder/v2/codersdk/agentsdk"
34+
"github.com/coder/coder/v2/pty"
3535
)
3636

3737
const (

agent/agentssh/agentssh_internal_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"github.com/stretchr/testify/assert"
1616
"github.com/stretchr/testify/require"
1717

18-
"github.com/coder/coder/pty"
19-
"github.com/coder/coder/testutil"
18+
"github.com/coder/coder/v2/pty"
19+
"github.com/coder/coder/v2/testutil"
2020

2121
"cdr.dev/slog/sloggers/slogtest"
2222
)

agent/agentssh/agentssh_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020

2121
"cdr.dev/slog/sloggers/slogtest"
2222

23-
"github.com/coder/coder/agent/agentssh"
24-
"github.com/coder/coder/codersdk/agentsdk"
25-
"github.com/coder/coder/pty/ptytest"
23+
"github.com/coder/coder/v2/agent/agentssh"
24+
"github.com/coder/coder/v2/codersdk/agentsdk"
25+
"github.com/coder/coder/v2/pty/ptytest"
2626
)
2727

2828
func TestMain(m *testing.M) {

agent/agentssh/x11_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919

2020
"cdr.dev/slog"
2121
"cdr.dev/slog/sloggers/slogtest"
22-
"github.com/coder/coder/agent/agentssh"
23-
"github.com/coder/coder/codersdk/agentsdk"
24-
"github.com/coder/coder/testutil"
22+
"github.com/coder/coder/v2/agent/agentssh"
23+
"github.com/coder/coder/v2/codersdk/agentsdk"
24+
"github.com/coder/coder/v2/testutil"
2525
)
2626

2727
func TestServer_X11(t *testing.T) {

agent/agenttest/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"golang.org/x/xerrors"
1414

1515
"cdr.dev/slog"
16-
"github.com/coder/coder/codersdk"
17-
"github.com/coder/coder/codersdk/agentsdk"
18-
"github.com/coder/coder/tailnet"
19-
"github.com/coder/coder/testutil"
16+
"github.com/coder/coder/v2/codersdk"
17+
"github.com/coder/coder/v2/codersdk/agentsdk"
18+
"github.com/coder/coder/v2/tailnet"
19+
"github.com/coder/coder/v2/testutil"
2020
)
2121

2222
func NewClient(t testing.TB,

agent/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77

88
"github.com/go-chi/chi/v5"
99

10-
"github.com/coder/coder/coderd/httpapi"
11-
"github.com/coder/coder/codersdk"
10+
"github.com/coder/coder/v2/coderd/httpapi"
11+
"github.com/coder/coder/v2/codersdk"
1212
)
1313

1414
func (a *agent) apiHandler() http.Handler {

0 commit comments

Comments
 (0)