Skip to content

Commit 00e8917

Browse files
evankandersonjeffmendoza
authored andcommitted
Rename boolArgPtr to 'runOnce`
Signed-off-by: Evan Anderson <[email protected]>
1 parent 1c18a33 commit 00e8917

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/allstar/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ func main() {
5656
supportedPoliciesMsg += policyName
5757
}
5858
}
59-
boolArgPtr := flag.Bool("once", false, "Run EnforceAll once, instead of in a continuous loop.")
59+
var runOnce bool
60+
flag.BoolVar(&runOnce, "once", false, "Run EnforceAll once, instead of in a continuous loop.")
6061

6162
specificPolicyArg := flag.String("policy", "", fmt.Sprintf("Run a specific policy check. Supported policies: %s", supportedPoliciesMsg))
6263
specificRepoArg := flag.String("repo", "", "Run on a specific \"owner/repo\". For example \"ossf/allstar\"")
@@ -79,7 +80,7 @@ func main() {
7980
Msg(fmt.Sprintf("Allstar will only run on repository %s", *specificRepoArg))
8081
}
8182

82-
if *boolArgPtr {
83+
if runOnce {
8384
_, err := enforce.EnforceAll(ctx, ghc, *specificPolicyArg, *specificRepoArg)
8485
if err != nil {
8586
log.Fatal().

0 commit comments

Comments
 (0)