Skip to content

Commit

Permalink
use flag instead of pflag
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Oct 19, 2018
1 parent 1fb525f commit 63beccd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License.
package main

import (
"flag"
"github.com/golang/glog"
log "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"os"
Expand All @@ -40,13 +40,11 @@ const (
)

func init() {
pflag.CommandLine.StringVar(&logLevel, "log-level", defaultLogLevel, "Log level (debug,info,warn,error,fatal)")
flag.CommandLine.StringVar(&logLevel, "log-level", defaultLogLevel, "Log level (debug,info,warn,error,fatal)")
}

func main() {
// the following line exists to make glog happy, for more information, see: https://github.com/kubernetes/kubernetes/issues/17162
//flag.CommandLine.Parse([]string{})
pflag.Parse()
flag.Parse()

// Get a config to talk to the apiserver
cfg, err := config.GetConfig()
Expand Down

0 comments on commit 63beccd

Please sign in to comment.