From b9c57b12428a0d5589058852eaaedb5f1e0b9d21 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Tue, 25 Dec 2018 19:21:12 +0300 Subject: [PATCH] Fix warning `ERROR: logging before flag.Parse` closes #39 --- cmd/kubedog/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/kubedog/main.go b/cmd/kubedog/main.go index 44bb48b..3ebc4ec 100644 --- a/cmd/kubedog/main.go +++ b/cmd/kubedog/main.go @@ -1,6 +1,7 @@ package main import ( + "flag" "fmt" "os" "time" @@ -13,6 +14,9 @@ import ( ) func main() { + // set flag.Parsed() for glog + flag.CommandLine.Parse([]string{}) + err := kube.Init(kube.InitOptions{}) if err != nil { fmt.Fprintf(os.Stderr, "Unable to initialize kube: %s\n", err)