diff --git a/src/framework/utils/ssh/sftp.go b/src/framework/utils/ssh/sftp.go index f5c103f7..45ef9af6 100644 --- a/src/framework/utils/ssh/sftp.go +++ b/src/framework/utils/ssh/sftp.go @@ -60,7 +60,7 @@ func (s *SSHClientSFTP) CopyDirRemoteToLocal(remoteDir, localDir string) error { return nil } -// CopyDirRemoteToLocal 复制目录-本地到远程 +// CopyDirLocalToRemote 复制目录-本地到远程 func (s *SSHClientSFTP) CopyDirLocalToRemote(localDir, remoteDir string) error { // 遍历本地目录中的文件和子目录并复制到远程 err := filepath.Walk(localDir, func(localPath string, info os.FileInfo, err error) error { @@ -94,7 +94,7 @@ func (s *SSHClientSFTP) CopyDirLocalToRemote(localDir, remoteDir string) error { return nil } -// CopyDirRemoteToLocal 复制文件-远程到本地 +// CopyFileRemoteToLocal 复制文件-远程到本地 func (s *SSHClientSFTP) CopyFileRemoteToLocal(remotePath, localPath string) error { if err := os.MkdirAll(filepath.Dir(localPath), 0775); err != nil { return err @@ -124,7 +124,7 @@ func (s *SSHClientSFTP) CopyFileRemoteToLocal(remotePath, localPath string) erro return nil } -// CopyDirRemoteToLocal 复制文件-本地到远程 +// CopyFileLocalToRemote 复制文件-本地到远程 func (s *SSHClientSFTP) CopyFileLocalToRemote(localPath, remotePath string) error { // 打开本地文件 localFile, err := os.Open(localPath)