Fix some golint errors for packages in pkg/kubectl/cmd

Co-authored-by: Arijit Basu <sayanarijit@gmail.com>
This commit is contained in:
Yang Li
2018-10-30 18:35:24 +08:00
parent b6a0718858
commit 141d33a2a5
83 changed files with 641 additions and 424 deletions

View File

@@ -36,6 +36,7 @@ var (
kubectl create namespace my-namespace`))
)
// NamespaceOpts is the options for 'create namespare' sub command
type NamespaceOpts struct {
CreateSubcommandOptions *CreateSubcommandOptions
}
@@ -68,6 +69,7 @@ func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStre
return cmd
}
// Complete completes all the required options
func (o *NamespaceOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
name, err := NameFromCommandArgs(cmd, args)
if err != nil {
@@ -85,7 +87,7 @@ func (o *NamespaceOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []s
return o.CreateSubcommandOptions.Complete(f, cmd, args, generator)
}
// CreateNamespace implements the behavior to run the create namespace command
// Run calls the CreateSubcommandOptions.Run in NamespaceOpts instance
func (o *NamespaceOpts) Run() error {
return o.CreateSubcommandOptions.Run()
}