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

Commit22e781e

Browse files
authored
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module pathgo mod requires semantic versioning with versions greater than 1.xThis was a mechanical update by running:```go install github.com/marwan-at-work/mod/cmd/mod@latestmod upgrade```Migrate generated files to import /v2* Fix gen
1 parent0d40e7f commit22e781e

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
funcTestMain(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
funcTestMain(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
funcTestServer_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
funcNewClient(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 {

‎agent/apphealth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"golang.org/x/xerrors"
1111

1212
"cdr.dev/slog"
13-
"github.com/coder/coder/codersdk"
14-
"github.com/coder/coder/codersdk/agentsdk"
13+
"github.com/coder/coder/v2/codersdk"
14+
"github.com/coder/coder/v2/codersdk/agentsdk"
1515
"github.com/coder/retry"
1616
)
1717

‎agent/apphealth_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313

1414
"cdr.dev/slog"
1515
"cdr.dev/slog/sloggers/slogtest"
16-
"github.com/coder/coder/agent"
17-
"github.com/coder/coder/coderd/httpapi"
18-
"github.com/coder/coder/codersdk"
19-
"github.com/coder/coder/codersdk/agentsdk"
20-
"github.com/coder/coder/testutil"
16+
"github.com/coder/coder/v2/agent"
17+
"github.com/coder/coder/v2/coderd/httpapi"
18+
"github.com/coder/coder/v2/codersdk"
19+
"github.com/coder/coder/v2/codersdk/agentsdk"
20+
"github.com/coder/coder/v2/testutil"
2121
)
2222

2323
funcTestAppHealth_Healthy(t*testing.T) {

‎agent/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"cdr.dev/slog"
1313

14-
"github.com/coder/coder/codersdk/agentsdk"
14+
"github.com/coder/coder/v2/codersdk/agentsdk"
1515
)
1616

1717
typeagentMetricsstruct {

‎agent/ports_supported.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/cakturk/go-netstat/netstat"
99
"golang.org/x/xerrors"
1010

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

1414
func (lp*listeningPortsHandler)getListeningPorts() ([]codersdk.WorkspaceAgentListeningPort,error) {

‎agent/ports_unsupported.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package agent
44

5-
import"github.com/coder/coder/codersdk"
5+
import"github.com/coder/coder/v2/codersdk"
66

77
func (lp*listeningPortsHandler)getListeningPorts() ([]codersdk.WorkspaceAgentListeningPort,error) {
88
// Can't scan for ports on non-linux or non-windows_amd64 systems at the

‎agent/reaper/reaper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/hashicorp/go-reap"
1515
"github.com/stretchr/testify/require"
1616

17-
"github.com/coder/coder/agent/reaper"
18-
"github.com/coder/coder/testutil"
17+
"github.com/coder/coder/v2/agent/reaper"
18+
"github.com/coder/coder/v2/testutil"
1919
)
2020

2121
// TestReap checks that's the reaper is successfully reaping

‎agent/reconnectingpty/buffered.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"cdr.dev/slog"
1616

17-
"github.com/coder/coder/pty"
17+
"github.com/coder/coder/v2/pty"
1818
)
1919

2020
// bufferedReconnectingPTY provides a reconnectable PTY by using a ring buffer to store

‎agent/reconnectingpty/reconnectingpty.go

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

1616
"cdr.dev/slog"
1717

18-
"github.com/coder/coder/codersdk"
19-
"github.com/coder/coder/pty"
18+
"github.com/coder/coder/v2/codersdk"
19+
"github.com/coder/coder/v2/pty"
2020
)
2121

2222
// attachTimeout is the initial timeout for attaching and will probably be far

‎agent/reconnectingpty/screen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"golang.org/x/xerrors"
2121

2222
"cdr.dev/slog"
23-
"github.com/coder/coder/pty"
23+
"github.com/coder/coder/v2/pty"
2424
)
2525

2626
// screenReconnectingPTY provides a reconnectable PTY via `screen`.

‎agent/usershell/usershell_test.go

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

88
"github.com/stretchr/testify/require"
99

10-
"github.com/coder/coder/agent/usershell"
10+
"github.com/coder/coder/v2/agent/usershell"
1111
)
1212

1313
//nolint:paralleltest,tparallel // This test sets an environment variable.

‎buildinfo/buildinfo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/stretchr/testify/require"
88
"golang.org/x/mod/semver"
99

10-
"github.com/coder/coder/buildinfo"
10+
"github.com/coder/coder/v2/buildinfo"
1111
)
1212

1313
funcTestBuildInfo(t*testing.T) {

‎cli/agent.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import (
2828
"cdr.dev/slog/sloggers/sloghuman"
2929
"cdr.dev/slog/sloggers/slogjson"
3030
"cdr.dev/slog/sloggers/slogstackdriver"
31-
"github.com/coder/coder/agent"
32-
"github.com/coder/coder/agent/reaper"
33-
"github.com/coder/coder/buildinfo"
34-
"github.com/coder/coder/cli/clibase"
35-
"github.com/coder/coder/codersdk"
36-
"github.com/coder/coder/codersdk/agentsdk"
31+
"github.com/coder/coder/v2/agent"
32+
"github.com/coder/coder/v2/agent/reaper"
33+
"github.com/coder/coder/v2/buildinfo"
34+
"github.com/coder/coder/v2/cli/clibase"
35+
"github.com/coder/coder/v2/codersdk"
36+
"github.com/coder/coder/v2/codersdk/agentsdk"
3737
)
3838

3939
func (r*RootCmd)workspaceAgent()*clibase.Cmd {

‎cli/agent_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import (
1313
"github.com/stretchr/testify/assert"
1414
"github.com/stretchr/testify/require"
1515

16-
"github.com/coder/coder/agent"
17-
"github.com/coder/coder/cli/clitest"
18-
"github.com/coder/coder/coderd/coderdtest"
19-
"github.com/coder/coder/codersdk"
20-
"github.com/coder/coder/provisioner/echo"
21-
"github.com/coder/coder/provisionersdk/proto"
22-
"github.com/coder/coder/pty/ptytest"
16+
"github.com/coder/coder/v2/agent"
17+
"github.com/coder/coder/v2/cli/clitest"
18+
"github.com/coder/coder/v2/coderd/coderdtest"
19+
"github.com/coder/coder/v2/codersdk"
20+
"github.com/coder/coder/v2/provisioner/echo"
21+
"github.com/coder/coder/v2/provisionersdk/proto"
22+
"github.com/coder/coder/v2/pty/ptytest"
2323
)
2424

2525
funcTestWorkspaceAgent(t*testing.T) {

‎cli/clibase/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"golang.org/x/xerrors"
1616
"gopkg.in/yaml.v3"
1717

18-
"github.com/coder/coder/coderd/util/slice"
18+
"github.com/coder/coder/v2/coderd/util/slice"
1919
)
2020

2121
// Cmd describes an executable command.

‎cli/clibase/cmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/stretchr/testify/require"
1212
"golang.org/x/xerrors"
1313

14-
"github.com/coder/coder/cli/clibase"
14+
"github.com/coder/coder/v2/cli/clibase"
1515
)
1616

1717
// ioBufs is the standard input, output, and error for a command.

‎cli/clibase/env_test.go

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

7-
"github.com/coder/coder/cli/clibase"
7+
"github.com/coder/coder/v2/cli/clibase"
88
)
99

1010
funcTestFilterNamePrefix(t*testing.T) {

‎cli/clibase/option_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/stretchr/testify/require"
77

8-
"github.com/coder/coder/cli/clibase"
8+
"github.com/coder/coder/v2/cli/clibase"
99
)
1010

1111
funcTestOptionSet_ParseFlags(t*testing.T) {

‎cli/clibase/yaml_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"golang.org/x/exp/slices"
99
"gopkg.in/yaml.v3"
1010

11-
"github.com/coder/coder/cli/clibase"
11+
"github.com/coder/coder/v2/cli/clibase"
1212
)
1313

1414
funcTestOptionSet_YAML(t*testing.T) {

‎cli/clitest/clitest.go

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

2020
"cdr.dev/slog"
2121
"cdr.dev/slog/sloggers/slogtest"
22-
"github.com/coder/coder/cli"
23-
"github.com/coder/coder/cli/clibase"
24-
"github.com/coder/coder/cli/config"
25-
"github.com/coder/coder/codersdk"
26-
"github.com/coder/coder/provisioner/echo"
27-
"github.com/coder/coder/testutil"
22+
"github.com/coder/coder/v2/cli"
23+
"github.com/coder/coder/v2/cli/clibase"
24+
"github.com/coder/coder/v2/cli/config"
25+
"github.com/coder/coder/v2/codersdk"
26+
"github.com/coder/coder/v2/provisioner/echo"
27+
"github.com/coder/coder/v2/testutil"
2828
)
2929

3030
// New creates a CLI instance with a configuration pointed to a

‎cli/clitest/clitest_test.go

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

66
"go.uber.org/goleak"
77

8-
"github.com/coder/coder/cli/clitest"
9-
"github.com/coder/coder/coderd/coderdtest"
10-
"github.com/coder/coder/pty/ptytest"
8+
"github.com/coder/coder/v2/cli/clitest"
9+
"github.com/coder/coder/v2/coderd/coderdtest"
10+
"github.com/coder/coder/v2/pty/ptytest"
1111
)
1212

1313
funcTestMain(m*testing.M) {

‎cli/clitest/golden.go

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

18-
"github.com/coder/coder/cli/clibase"
19-
"github.com/coder/coder/cli/config"
20-
"github.com/coder/coder/coderd/coderdtest"
21-
"github.com/coder/coder/coderd/database/dbtestutil"
22-
"github.com/coder/coder/codersdk"
23-
"github.com/coder/coder/testutil"
18+
"github.com/coder/coder/v2/cli/clibase"
19+
"github.com/coder/coder/v2/cli/config"
20+
"github.com/coder/coder/v2/coderd/coderdtest"
21+
"github.com/coder/coder/v2/coderd/database/dbtestutil"
22+
"github.com/coder/coder/v2/codersdk"
23+
"github.com/coder/coder/v2/testutil"
2424
)
2525

2626
// UpdateGoldenFiles indicates golden files should be updated.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp