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:
@@ -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{
|
||||
|
Reference in New Issue
Block a user