Skip to content

Commit

Permalink
Merge pull request #13 from hex108/flag
Browse files Browse the repository at this point in the history
Fix flag bug
  • Loading branch information
hex108 authored Dec 30, 2019
2 parents 39ea6ad + 13b5c28 commit 4bb2522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ const (
)

func main() {
flag.CommandLine.Parse([]string{})

cfg, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfig)
if err != nil {
klog.Fatalf("Error building kubeconfig: %s", err.Error())
Expand Down Expand Up @@ -182,7 +180,9 @@ func main() {
}

func init() {
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
addFlags(pflag.CommandLine)
pflag.Parse()

logs.InitLogs()
defer logs.FlushLogs()
Expand Down

0 comments on commit 4bb2522

Please sign in to comment.