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

Commit340f9da

Browse files
chore: appease linter
1 parent7953c25 commit340f9da

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

‎agent/agenttest/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,15 @@ func (f *FakeAgentAPI) GetConnectionReports() []*agentproto.ReportConnectionRequ
364364
returnslices.Clone(f.connectionReports)
365365
}
366366

367-
func (f*FakeAgentAPI)CreateDevContainerAgent(_ context.Context,req*agentproto.CreateDevContainerAgentRequest) (*agentproto.CreateDevContainerAgentResponse,error) {
367+
func (*FakeAgentAPI)CreateDevContainerAgent(_ context.Context,_*agentproto.CreateDevContainerAgentRequest) (*agentproto.CreateDevContainerAgentResponse,error) {
368368
panic("unimplemented")
369369
}
370370

371-
func (f*FakeAgentAPI)DeleteDevContainerAgent(_ context.Context,req*agentproto.DeleteDevContainerAgentRequest) (*emptypb.Empty,error) {
371+
func (*FakeAgentAPI)DeleteDevContainerAgent(_ context.Context,_*agentproto.DeleteDevContainerAgentRequest) (*emptypb.Empty,error) {
372372
panic("unimplemented")
373373
}
374374

375-
func (f*FakeAgentAPI)ListDevContainerAgents(_ context.Context,req*agentproto.ListDevContainerAgentsRequest) (*agentproto.ListDevContainerAgentsResponse,error) {
375+
func (*FakeAgentAPI)ListDevContainerAgents(_ context.Context,_*agentproto.ListDevContainerAgentsRequest) (*agentproto.ListDevContainerAgentsResponse,error) {
376376
panic("unimplemented")
377377
}
378378

‎coderd/agentapi/devcontainer_agent.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import (
44
"context"
55
"strings"
66

7+
"github.com/google/uuid"
8+
"github.com/sqlc-dev/pqtype"
9+
"golang.org/x/xerrors"
10+
"google.golang.org/protobuf/types/known/emptypb"
11+
712
"cdr.dev/slog"
813
agentproto"github.com/coder/coder/v2/agent/proto"
914
"github.com/coder/coder/v2/coderd/database"
1015
"github.com/coder/coder/v2/coderd/database/dbauthz"
1116
"github.com/coder/quartz"
12-
"github.com/google/uuid"
13-
"github.com/sqlc-dev/pqtype"
14-
"golang.org/x/xerrors"
15-
"google.golang.org/protobuf/types/known/emptypb"
1617
)
1718

1819
typeDevContainerAgentAPIstruct {
@@ -25,6 +26,7 @@ type DevContainerAgentAPI struct {
2526
}
2627

2728
func (a*DevContainerAgentAPI)CreateDevContainerAgent(ctx context.Context,req*agentproto.CreateDevContainerAgentRequest) (*agentproto.CreateDevContainerAgentResponse,error) {
29+
//nolint:gocritic // We are the Dev Container Agent API, so this is safe.
2830
ctx=dbauthz.AsDevContainerAgentAPI(ctx)
2931

3032
parentAgent,err:=a.AgentFn(ctx)
@@ -68,6 +70,7 @@ func (a *DevContainerAgentAPI) CreateDevContainerAgent(ctx context.Context, req
6870
}
6971

7072
func (a*DevContainerAgentAPI)DeleteDevContainerAgent(ctx context.Context,req*agentproto.DeleteDevContainerAgentRequest) (*emptypb.Empty,error) {
73+
//nolint:gocritic // We are the Dev Container Agent API, so this is safe.
7174
ctx=dbauthz.AsDevContainerAgentAPI(ctx)
7275

7376
devContainerAgentID,err:=uuid.FromBytes(req.Id)
@@ -82,7 +85,8 @@ func (a *DevContainerAgentAPI) DeleteDevContainerAgent(ctx context.Context, req
8285
return&emptypb.Empty{},nil
8386
}
8487

85-
func (a*DevContainerAgentAPI)ListDevContainerAgents(ctx context.Context,req*agentproto.ListDevContainerAgentsRequest) (*agentproto.ListDevContainerAgentsResponse,error) {
88+
func (a*DevContainerAgentAPI)ListDevContainerAgents(ctx context.Context,_*agentproto.ListDevContainerAgentsRequest) (*agentproto.ListDevContainerAgentsResponse,error) {
89+
//nolint:gocritic // We are the Dev Container Agent API, so this is safe.
8690
ctx=dbauthz.AsDevContainerAgentAPI(ctx)
8791

8892
workspaceAgents,err:=a.Database.GetWorkspaceAgentsWithParentID(ctx, uuid.NullUUID{Valid:true,UUID:a.AgentID})

‎coderd/agentapi/devcontainer_agent_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import (
55
"sync/atomic"
66
"testing"
77

8+
"github.com/google/uuid"
9+
"github.com/prometheus/client_golang/prometheus"
10+
"github.com/stretchr/testify/require"
11+
812
"cdr.dev/slog"
913
"github.com/coder/coder/v2/agent/proto"
1014
"github.com/coder/coder/v2/coderd/agentapi"
@@ -15,9 +19,6 @@ import (
1519
"github.com/coder/coder/v2/coderd/rbac"
1620
"github.com/coder/coder/v2/testutil"
1721
"github.com/coder/quartz"
18-
"github.com/google/uuid"
19-
"github.com/prometheus/client_golang/prometheus"
20-
"github.com/stretchr/testify/require"
2122
)
2223

2324
funcdevContainerAgentAPI(t*testing.T,log slog.Logger)*agentapi.DevContainerAgentAPI {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp