update various commands to adapt the new Factory interface

This commit is contained in:
AdoHe
2016-10-13 08:18:39 +08:00
parent dfae1a27c2
commit b2280a646a
53 changed files with 154 additions and 200 deletions

View File

@@ -44,7 +44,7 @@ var (
)
// NewCmdExplain returns a cobra command for swagger docs
func NewCmdExplain(f *cmdutil.Factory, out, cmdErr io.Writer) *cobra.Command {
func NewCmdExplain(f cmdutil.Factory, out, cmdErr io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "explain RESOURCE",
Short: "Documentation of resources",
@@ -61,7 +61,7 @@ func NewCmdExplain(f *cmdutil.Factory, out, cmdErr io.Writer) *cobra.Command {
}
// RunExplain executes the appropriate steps to print a model's documentation
func RunExplain(f *cmdutil.Factory, out, cmdErr io.Writer, cmd *cobra.Command, args []string) error {
func RunExplain(f cmdutil.Factory, out, cmdErr io.Writer, cmd *cobra.Command, args []string) error {
if len(args) == 0 {
fmt.Fprint(cmdErr, "You must specify the type of resource to explain. ", valid_resources)
return cmdutil.UsageError(cmd, "Required resource not specified.")