integrated glog in command structure
This commit is contained in:
parent
a3fb1a16af
commit
04ab5927db
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue