Skip to content

Commit

Permalink
Rename boolArgPtr to 'runOnce`
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Anderson <evan@stacklok.com>
  • Loading branch information
evankanderson authored and jeffmendoza committed Nov 22, 2023
1 parent 1c18a33 commit 00e8917
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/allstar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func main() {
supportedPoliciesMsg += policyName
}
}
boolArgPtr := flag.Bool("once", false, "Run EnforceAll once, instead of in a continuous loop.")
var runOnce bool
flag.BoolVar(&runOnce, "once", false, "Run EnforceAll once, instead of in a continuous loop.")

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

if *boolArgPtr {
if runOnce {
_, err := enforce.EnforceAll(ctx, ghc, *specificPolicyArg, *specificRepoArg)
if err != nil {
log.Fatal().
Expand Down

0 comments on commit 00e8917

Please sign in to comment.