Merge pull request #387 from droot/glog

integrated glog in command structure
This commit is contained in:
k8s-ci-robot 2018-03-30 16:21:03 -07:00 committed by GitHub
commit d005de0dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -19,10 +19,14 @@ package main
import (
"os"
"github.com/golang/glog"
"k8s.io/kubectl/pkg/kinflate/commands"
)
func main() {
defer glog.Flush()
if err := commands.NewDefaultCommand().Execute(); err != nil {
os.Exit(1)
}

View File

@ -17,6 +17,7 @@ limitations under the License.
package commands
import (
"flag"
"io"
"os"
@ -50,6 +51,13 @@ Find more information at:
newCmdSet(stdOut, stdErr, fsys),
)
// add the glog flags
c.PersistentFlags().AddGoFlagSet(flag.CommandLine)
// Workaround for this issue:
// https://github.com/kubernetes/kubernetes/issues/17162
flag.CommandLine.Parse([]string{})
return c
}