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

Skip to content

Commit 7180233

Browse files
committed
Fix linting error
1 parent 1aec36d commit 7180233

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

cli/workspaceagent.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import (
44
"net/url"
55
"os"
66

7-
"github.com/coder/coder/agent"
8-
"github.com/coder/coder/codersdk"
97
"github.com/powersj/whatsthis/pkg/cloud"
108
"github.com/spf13/cobra"
119
"golang.org/x/xerrors"
10+
11+
"github.com/coder/coder/agent"
12+
"github.com/coder/coder/codersdk"
1213
)
1314

1415
func workspaceAgent() *cobra.Command {

cli/workspaces.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ func workspaces() *cobra.Command {
66
cmd := &cobra.Command{
77
Use: "workspaces",
88
}
9+
cmd.AddCommand(workspaceAgent())
910
cmd.AddCommand(workspaceCreate())
1011

1112
return cmd

coderd/workspaceagent_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import (
55
"testing"
66
"time"
77

8+
"github.com/google/uuid"
9+
"github.com/stretchr/testify/require"
10+
811
"cdr.dev/slog"
912
"cdr.dev/slog/sloggers/slogtest"
1013
"github.com/coder/coder/agent"
@@ -16,8 +19,6 @@ import (
1619
"github.com/coder/coder/peerbroker"
1720
"github.com/coder/coder/provisioner/echo"
1821
"github.com/coder/coder/provisionersdk/proto"
19-
"github.com/google/uuid"
20-
"github.com/stretchr/testify/require"
2122
)
2223

2324
func TestWorkspaceAgentServe(t *testing.T) {

codersdk/workspaceagent.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ import (
1212
"golang.org/x/xerrors"
1313
"nhooyr.io/websocket"
1414

15+
"github.com/google/uuid"
16+
"github.com/hashicorp/yamux"
17+
1518
"github.com/coder/coder/coderd"
1619
"github.com/coder/coder/httpmw"
1720
"github.com/coder/coder/peer"
1821
"github.com/coder/coder/peerbroker"
1922
"github.com/coder/coder/peerbroker/proto"
2023
"github.com/coder/coder/provisionersdk"
21-
"github.com/google/uuid"
22-
"github.com/hashicorp/yamux"
2324
)
2425

2526
// AuthenticateWorkspaceAgentUsingGoogleCloudIdentity uses the Google Compute Engine Metadata API to

database/databasefake/databasefake.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func (q *fakeQuerier) GetProvisionerJobAgentByInstanceID(_ context.Context, inst
534534
return database.ProvisionerJobAgent{}, sql.ErrNoRows
535535
}
536536

537-
func (q *fakeQuerier) GetProvisionerJobAgentByResourceID(ctx context.Context, resourceID uuid.UUID) (database.ProvisionerJobAgent, error) {
537+
func (q *fakeQuerier) GetProvisionerJobAgentByResourceID(_ context.Context, resourceID uuid.UUID) (database.ProvisionerJobAgent, error) {
538538
q.mutex.Lock()
539539
defer q.mutex.Unlock()
540540

@@ -962,7 +962,7 @@ func (q *fakeQuerier) UpdateProvisionerDaemonByID(_ context.Context, arg databas
962962
return sql.ErrNoRows
963963
}
964964

965-
func (q *fakeQuerier) UpdateProvisionerJobAgentByID(ctx context.Context, arg database.UpdateProvisionerJobAgentByIDParams) error {
965+
func (q *fakeQuerier) UpdateProvisionerJobAgentByID(_ context.Context, arg database.UpdateProvisionerJobAgentByIDParams) error {
966966
q.mutex.Lock()
967967
defer q.mutex.Unlock()
968968

0 commit comments

Comments
 (0)