Skip to content

Commit

Permalink
"fix Klog flags disppeared (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: JiaHao Wei <1335649406@qq.com>
  • Loading branch information
JiahaoWei-RH authored Mar 16, 2022
1 parent f2fc48e commit edd1600
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/helloworld/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func main() {
pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

logs.InitLogs()
defer logs.FlushLogs()
logs.NewOptions().AddFlags(pflag.CommandLine)

command := newCommand()
if err := command.Execute(); err != nil {
Expand Down
3 changes: 1 addition & 2 deletions examples/helloworld_helm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ func main() {
pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

logs.InitLogs()
defer logs.FlushLogs()
logs.NewOptions().AddFlags(pflag.CommandLine)

command := newCommand()
if err := command.Execute(); err != nil {
Expand Down

0 comments on commit edd1600

Please sign in to comment.