Merge pull request #43297 from mvdan/kubectl-params

Automatic merge from submit-queue

kubectl/cmd: remove a bunch of unused parameters

Found with github.com/mvdan/unparam.

**Release note**: NONE
This commit is contained in:
Kubernetes Submit Queue
2017-04-13 04:07:21 -07:00
committed by GitHub
26 changed files with 56 additions and 71 deletions

View File

@@ -59,7 +59,7 @@ var (
)
// NewCmdCp creates a new Copy command.
func NewCmdCp(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command {
func NewCmdCp(f cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "cp <file-spec-src> <file-spec-dest>",
Short: i18n.T("Copy files and directories to and from containers."),
@@ -121,7 +121,7 @@ func runCopy(f cmdutil.Factory, cmd *cobra.Command, out, cmderr io.Writer, args
return err
}
if len(srcSpec.PodName) != 0 {
return copyFromPod(f, cmd, out, cmderr, srcSpec, destSpec)
return copyFromPod(f, cmd, cmderr, srcSpec, destSpec)
}
if len(destSpec.PodName) != 0 {
return copyToPod(f, cmd, out, cmderr, srcSpec, destSpec)
@@ -161,7 +161,7 @@ func copyToPod(f cmdutil.Factory, cmd *cobra.Command, stdout, stderr io.Writer,
return execute(f, cmd, options)
}
func copyFromPod(f cmdutil.Factory, cmd *cobra.Command, out, cmderr io.Writer, src, dest fileSpec) error {
func copyFromPod(f cmdutil.Factory, cmd *cobra.Command, cmderr io.Writer, src, dest fileSpec) error {
reader, outStream := io.Pipe()
options := &ExecOptions{
StreamOptions: StreamOptions{