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

Commitb6140af

Browse files
committed
fix appendAssign
1 parentf3f5755 commitb6140af

File tree

8 files changed

+13
-3
lines changed

8 files changed

+13
-3
lines changed

‎agent/reconnectingpty/buffered.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func newBuffered(ctx context.Context, logger slog.Logger, execer agentexec.Exece
6060
// Add TERM then start the command with a pty. pty.Cmd duplicates Path as the
6161
// first argument so remove it.
6262
cmdWithEnv:=execer.PTYCommandContext(ctx,cmd.Path,cmd.Args[1:]...)
63+
//nolint:gocritic
6364
cmdWithEnv.Env=append(rpty.command.Env,"TERM=xterm-256color")
6465
cmdWithEnv.Dir=rpty.command.Dir
6566
ptty,process,err:=pty.Start(cmdWithEnv)

‎agent/reconnectingpty/screen.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ func (rpty *screenReconnectingPTY) doAttach(ctx context.Context, conn net.Conn,
225225
rpty.command.Path,
226226
// pty.Cmd duplicates Path as the first argument so remove it.
227227
},rpty.command.Args[1:]...)...)
228+
//nolint:gocritic
228229
cmd.Env=append(rpty.command.Env,"TERM=xterm-256color")
229230
cmd.Dir=rpty.command.Dir
230231
ptty,process,err:=pty.Start(cmd,pty.WithPTYOption(
@@ -340,6 +341,7 @@ func (rpty *screenReconnectingPTY) sendCommand(ctx context.Context, command stri
340341
// -X runs a command in the matching session.
341342
"-X",command,
342343
)
344+
//nolint:gocritic
343345
cmd.Env=append(rpty.command.Env,"TERM=xterm-256color")
344346
cmd.Dir=rpty.command.Dir
345347
cmd.Stdout=&stdout

‎cli/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
127127
logger.Info(ctx,"spawning reaper process")
128128
// Do not start a reaper on the child process. It's important
129129
// to do this else we fork bomb ourselves.
130+
//nolint:gocritic
130131
args:=append(os.Args,"--no-reap")
131132
err:=reaper.ForkReap(
132133
reaper.WithExecArgs(args...),

‎cli/clitest/golden.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func TestCommandHelp(t *testing.T, getRoot func(t *testing.T) *serpent.Command,
5858
ExtractCommandPathsLoop:
5959
for_,cp:=rangeextractVisibleCommandPaths(nil,root.Children) {
6060
name:=fmt.Sprintf("coder %s --help",strings.Join(cp," "))
61+
//nolint:gocritic
6162
cmd:=append(cp,"--help")
6263
for_,tt:=rangecases {
6364
iftt.Name==name {

‎cli/server_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,7 @@ func TestServer(t *testing.T) {
17011701
// Next, we instruct the same server to display the YAML config
17021702
// and then save it.
17031703
inv=inv.WithContext(testutil.Context(t,testutil.WaitMedium))
1704+
//nolint:gocritic
17041705
inv.Args=append(args,"--write-config")
17051706
fi,err:=os.OpenFile(testutil.TempFile(t,"","coder-config-test-*"),os.O_WRONLY|os.O_CREATE,0o600)
17061707
require.NoError(t,err)

‎cli/templatepush_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ func TestTemplatePush(t *testing.T) {
723723
template:=coderdtest.CreateTemplate(t,client,owner.OrganizationID,templateVersion.ID)
724724

725725
// Test the cli command.
726+
//nolint:gocritic
726727
modifiedTemplateVariables:=append(initialTemplateVariables,
727728
&proto.TemplateVariable{
728729
Name:"second_variable",
@@ -792,6 +793,7 @@ func TestTemplatePush(t *testing.T) {
792793
template:=coderdtest.CreateTemplate(t,client,owner.OrganizationID,templateVersion.ID)
793794

794795
// Test the cli command.
796+
//nolint:gocritic
795797
modifiedTemplateVariables:=append(initialTemplateVariables,
796798
&proto.TemplateVariable{
797799
Name:"second_variable",
@@ -839,6 +841,7 @@ func TestTemplatePush(t *testing.T) {
839841
template:=coderdtest.CreateTemplate(t,client,owner.OrganizationID,templateVersion.ID)
840842

841843
// Test the cli command.
844+
//nolint:gocritic
842845
modifiedTemplateVariables:=append(initialTemplateVariables,
843846
&proto.TemplateVariable{
844847
Name:"second_variable",
@@ -905,6 +908,7 @@ func TestTemplatePush(t *testing.T) {
905908
template:=coderdtest.CreateTemplate(t,client,owner.OrganizationID,templateVersion.ID)
906909

907910
// Test the cli command.
911+
//nolint:gocritic
908912
modifiedTemplateVariables:=append(initialTemplateVariables,
909913
&proto.TemplateVariable{
910914
Name:"second_variable",

‎coderd/database/dbauthz/dbauthz.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,6 +3212,7 @@ func (q *querier) InsertOrganizationMember(ctx context.Context, arg database.Ins
32123212
}
32133213

32143214
// All roles are added roles. Org member is always implied.
3215+
//nolint:gocritic
32153216
addedRoles:=append(orgRoles,rbac.ScopedRoleOrgMember(arg.OrganizationID))
32163217
err=q.canAssignRoles(ctx,arg.OrganizationID,addedRoles, []rbac.RoleIdentifier{})
32173218
iferr!=nil {
@@ -3796,6 +3797,7 @@ func (q *querier) UpdateMemberRoles(ctx context.Context, arg database.UpdateMemb
37963797
}
37973798

37983799
// The org member role is always implied.
3800+
//nolint:gocritic
37993801
impliedTypes:=append(scopedGranted,rbac.ScopedRoleOrgMember(arg.OrgID))
38003802

38013803
added,removed:=rbac.ChangeRoleSet(originalRoles,impliedTypes)

‎support/support.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,9 @@ func WorkspaceInfo(ctx context.Context, client *codersdk.Client, log slog.Logger
241241
returnxerrors.Errorf("fetch provisioner job logs: %w",err)
242242
}
243243
defercloser.Close()
244-
varlogs []codersdk.ProvisionerJobLog
245244
forlog:=rangebuildLogCh {
246-
logs=append(w.BuildLogs,log)
245+
w.BuildLogs=append(w.BuildLogs,log)
247246
}
248-
w.BuildLogs=logs
249247
returnnil
250248
})
251249

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp