Skip to content

Commit 7235bfb

Browse files
committed
add comment for the use of flags
1 parent b158919 commit 7235bfb

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
return i, 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
func niceScoreArg(score int) string {
78-
return fmt.Sprintf("--%s=%d", niceArg, score)
81+
return fmt.Sprintf("--%s=%d", niceFlag, score)
7982
}
8083

8184
func oomScoreArg(score int) string {
82-
return fmt.Sprintf("--%s=%d", oomArg, score)
85+
return fmt.Sprintf("--%s=%d", oomFlag, score)
8386
}

0 commit comments

Comments
 (0)