move f.Command out of the factory

This commit is contained in:
juanvallejo
2018-05-21 15:27:11 -04:00
parent e85b81bbee
commit 0d3e85608f
18 changed files with 68 additions and 63 deletions

View File

@@ -21,9 +21,9 @@ import (
"strings"
"github.com/spf13/cobra"
"k8s.io/api/core/v1"
"github.com/golang/glog"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -147,7 +147,7 @@ func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *co
func (o *SetResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
var err error
o.RecordFlags.Complete(f.Command(cmd, false))
o.RecordFlags.Complete(cmd)
o.Recorder, err = o.RecordFlags.ToRecorder()
if err != nil {
return err