Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba7c7fe

Browse files
committed
chore(cdr): Move httpmw to /coderd directory
httpmw is specific to coderd and should be scoped under coderd
1 parent 21fdb80 commit ba7c7fe

31 files changed

+21
-21
lines changed

coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"cdr.dev/slog"
1313
"github.com/coder/coder/database"
1414
"github.com/coder/coder/httpapi"
15-
"github.com/coder/coder/httpmw"
15+
"github.com/coder/coder/coderd/httpmw"
1616
"github.com/coder/coder/site"
1717
)
1818

coderd/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/coder/coder/codersdk"
1616
"github.com/coder/coder/database"
1717
"github.com/coder/coder/httpapi"
18-
"github.com/coder/coder/httpmw"
18+
"github.com/coder/coder/coderd/httpmw"
1919
)
2020

2121
func (api *api) postFile(rw http.ResponseWriter, r *http.Request) {
File renamed without changes.

httpmw/apikey_test.go renamed to coderd/httpmw/apikey_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/database"
1717
"github.com/coder/coder/database/databasefake"
1818
"github.com/coder/coder/httpapi"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func randomAPIKeyParts() (id string, secret string) {
File renamed without changes.
File renamed without changes.

httpmw/organizationparam_test.go renamed to coderd/httpmw/organizationparam_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/cryptorand"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/database/databasefake"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func TestOrganizationParam(t *testing.T) {
File renamed without changes.

httpmw/projectparam_test.go renamed to coderd/httpmw/projectparam_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/cryptorand"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/database/databasefake"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func TestProjectParam(t *testing.T) {
File renamed without changes.

httpmw/projectversionparam_test.go renamed to coderd/httpmw/projectversionparam_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/cryptorand"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/database/databasefake"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func TestProjectVersionParam(t *testing.T) {
File renamed without changes.

httpmw/userparam_test.go renamed to coderd/httpmw/userparam_test.go

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

1515
"github.com/coder/coder/database"
1616
"github.com/coder/coder/database/databasefake"
17-
"github.com/coder/coder/httpmw"
17+
"github.com/coder/coder/coderd/httpmw"
1818
)
1919

2020
func TestUserParam(t *testing.T) {
File renamed without changes.

httpmw/workspaceagent_test.go renamed to coderd/httpmw/workspaceagent_test.go

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

1313
"github.com/coder/coder/database"
1414
"github.com/coder/coder/database/databasefake"
15-
"github.com/coder/coder/httpmw"
15+
"github.com/coder/coder/coderd/httpmw"
1616
)
1717

1818
func TestWorkspaceAgent(t *testing.T) {
File renamed without changes.

httpmw/workspacebuildparam_test.go renamed to coderd/httpmw/workspacebuildparam_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/cryptorand"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/database/databasefake"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func TestWorkspaceBuildParam(t *testing.T) {
File renamed without changes.

httpmw/workspaceparam_test.go renamed to coderd/httpmw/workspaceparam_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/cryptorand"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/database/databasefake"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func TestWorkspaceParam(t *testing.T) {

httpmw/workspaceresourceparam_test.go renamed to coderd/httpmw/workspaceresourceparam_test.go

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

1313
"github.com/coder/coder/database"
1414
"github.com/coder/coder/database/databasefake"
15-
"github.com/coder/coder/httpmw"
15+
"github.com/coder/coder/coderd/httpmw"
1616
)
1717

1818
func TestWorkspaceResourceParam(t *testing.T) {

coderd/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/coder/coder/codersdk"
1616
"github.com/coder/coder/database"
1717
"github.com/coder/coder/httpapi"
18-
"github.com/coder/coder/httpmw"
18+
"github.com/coder/coder/coderd/httpmw"
1919
)
2020

2121
func (*api) organization(rw http.ResponseWriter, r *http.Request) {

coderd/projects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/coder/coder/codersdk"
1414
"github.com/coder/coder/database"
1515
"github.com/coder/coder/httpapi"
16-
"github.com/coder/coder/httpmw"
16+
"github.com/coder/coder/coderd/httpmw"
1717
)
1818

1919
// Returns a single project.

coderd/projectversions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/coder/coder/codersdk"
1313
"github.com/coder/coder/database"
1414
"github.com/coder/coder/httpapi"
15-
"github.com/coder/coder/httpmw"
15+
"github.com/coder/coder/coderd/httpmw"
1616
)
1717

1818
func (api *api) projectVersion(rw http.ResponseWriter, r *http.Request) {

coderd/users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/coder/coder/cryptorand"
2121
"github.com/coder/coder/database"
2222
"github.com/coder/coder/httpapi"
23-
"github.com/coder/coder/httpmw"
23+
"github.com/coder/coder/coderd/httpmw"
2424
)
2525

2626
// Returns whether the initial user has been created or not.

coderd/users_test.go

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

1111
"github.com/coder/coder/coderd/coderdtest"
1212
"github.com/coder/coder/codersdk"
13-
"github.com/coder/coder/httpmw"
13+
"github.com/coder/coder/coderd/httpmw"
1414
)
1515

1616
func TestFirstUser(t *testing.T) {

coderd/workspacebuilds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/coder/coder/codersdk"
1111
"github.com/coder/coder/database"
1212
"github.com/coder/coder/httpapi"
13-
"github.com/coder/coder/httpmw"
13+
"github.com/coder/coder/coderd/httpmw"
1414
)
1515

1616
func (api *api) workspaceBuild(rw http.ResponseWriter, r *http.Request) {

coderd/workspaceresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/coder/coder/codersdk"
1919
"github.com/coder/coder/database"
2020
"github.com/coder/coder/httpapi"
21-
"github.com/coder/coder/httpmw"
21+
"github.com/coder/coder/coderd/httpmw"
2222
"github.com/coder/coder/peerbroker"
2323
"github.com/coder/coder/peerbroker/proto"
2424
"github.com/coder/coder/provisionersdk"

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/codersdk"
1717
"github.com/coder/coder/database"
1818
"github.com/coder/coder/httpapi"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
)
2121

2222
func (api *api) workspace(rw http.ResponseWriter, r *http.Request) {

codersdk/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
"golang.org/x/xerrors"
1515

16+
"github.com/coder/coder/coderd/httpmw"
1617
"github.com/coder/coder/httpapi"
17-
"github.com/coder/coder/httpmw"
1818
)
1919

2020
// New creates a Coder client for the provided URL.

codersdk/workspaceresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"nhooyr.io/websocket"
1717

1818
"github.com/coder/coder/database"
19-
"github.com/coder/coder/httpmw"
19+
"github.com/coder/coder/coderd/httpmw"
2020
"github.com/coder/coder/peer"
2121
"github.com/coder/coder/peerbroker"
2222
"github.com/coder/coder/peerbroker/proto"

0 commit comments

Comments
 (0)