Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Georgy Galakhov <[email protected]>
  • Loading branch information
ggalakhov authored and jcarrig committed Jul 11, 2024
1 parent f9335c2 commit c8062e7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/operator/controllermanager/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ func InitFlags() {
}
vttabletFlags.VisitAll(func(f *pflag.Flag) {
_, isRequired := tlsFlags[f.Name]
isAlreadyAdded := pflag.CommandLine.Lookup(f.Name) != nil
if isRequired && !isAlreadyAdded {
pflag.CommandLine.AddFlag(f)
tlsFlags[f.Name] = true
if isRequired {
isAlreadyAdded := pflag.CommandLine.Lookup(f.Name) != nil
if !isAlreadyAdded {
pflag.CommandLine.AddFlag(f)
tlsFlags[f.Name] = true
}
}
})
for flagName, wasAdded := range tlsFlags {
Expand Down

0 comments on commit c8062e7

Please sign in to comment.