Refactor kubectl/cmd helpers into pkg/kubectl/cmd/util

Allows helpers to be used by config commands.
This commit is contained in:
Jeff Lowdermilk
2015-02-04 16:14:48 -08:00
parent afeaf8fc6f
commit d46ae5d841
20 changed files with 179 additions and 185 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/spf13/cobra"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util"
)
func (f *Factory) NewCmdVersion(out io.Writer) *cobra.Command {
@@ -29,7 +30,7 @@ func (f *Factory) NewCmdVersion(out io.Writer) *cobra.Command {
Use: "version",
Short: "Print version of client and server",
Run: func(cmd *cobra.Command, args []string) {
if GetFlagBool(cmd, "client") {
if util.GetFlagBool(cmd, "client") {
kubectl.GetClientVersion(out)
return
}