refactor to move kubectl.cmd.Factory to kubect/cmd/util

This commit is contained in:
deads2k
2015-04-07 14:21:25 -04:00
parent 13b805fe1e
commit 6344cf3c3a
34 changed files with 664 additions and 611 deletions

View File

@@ -26,6 +26,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd"
clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
@@ -618,8 +619,9 @@ func testConfigCommand(args []string, startingConfig clientcmdapi.Config) (strin
argsToUse = append(argsToUse, args...)
buf := bytes.NewBuffer([]byte{})
f := cmdutil.NewFactory(nil)
cmd := NewCmdConfig(buf)
cmd := NewCmdConfig(f, buf)
cmd.SetArgs(argsToUse)
cmd.Execute()