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

Commit7235bfb

Browse files
committed
add comment for the use of flags
1 parentb158919 commit7235bfb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎agent/agentexec/exec.go‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,18 @@ func envValInt(key string) (int, bool) {
6969
returni,true
7070
}
7171

72+
// The following are flags used by the agent-exec command. We use flags instead of
73+
// environment variables to avoid having to deal with a caller overriding the
74+
// environment variables.
7275
const (
73-
niceArg="coder-nice"
74-
oomArg="coder-oom"
76+
niceFlag="coder-nice"
77+
oomFlag="coder-oom"
7578
)
7679

7780
funcniceScoreArg(scoreint)string {
78-
returnfmt.Sprintf("--%s=%d",niceArg,score)
81+
returnfmt.Sprintf("--%s=%d",niceFlag,score)
7982
}
8083

8184
funcoomScoreArg(scoreint)string {
82-
returnfmt.Sprintf("--%s=%d",oomArg,score)
85+
returnfmt.Sprintf("--%s=%d",oomFlag,score)
8386
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp