Skip to content

Commit

Permalink
Clean up code comments
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih committed Feb 18, 2022
1 parent 4939941 commit 396b126
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/provisioner-localpv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func init() {
flag.CommandLine.Set("alsologtostderr", "true")

// Merge klog CLI flags to the global flagset
// The pflag.Commandline FlagSet will be parsed
// in the run() function in this package, before
// initializing logging and cobra command execution.
// Ref: github.com/spf13/pflag#supporting-go-flags-when-using-pflag
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
}

Expand All @@ -62,8 +66,8 @@ func run() error {
}

// Merge all flags from the Cobra Command to the global FlagSet
// and Parse them
pflag.CommandLine.AddFlagSet(cmd.Flags())
// Parse all flags
pflag.Parse()

// NOTE: Logging must start after CLI flags have been parsed
Expand Down

0 comments on commit 396b126

Please sign in to comment.