sys/ssh - amend DownloadFile
This commit is contained in:
parent
b71ede4c1b
commit
7ffbfe6714
|
@ -8,6 +8,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gitea.meta-tech.academy/go/core/echo"
|
"gitea.meta-tech.academy/go/core/echo"
|
||||||
|
@ -121,6 +122,9 @@ func (s *Ssh) Scp() *sftp.Client {
|
||||||
type ApplyOnSize func(s *Ssh, size int64)
|
type ApplyOnSize func(s *Ssh, size int64)
|
||||||
|
|
||||||
func (s *Ssh) DownloadFile(remoteFile string, localFile string, display bool, close bool, fn ...ApplyOnSize) bool {
|
func (s *Ssh) DownloadFile(remoteFile string, localFile string, display bool, close bool, fn ...ApplyOnSize) bool {
|
||||||
|
if display {
|
||||||
|
echo.Action("Downloading docker image", path.Base(remoteFile))
|
||||||
|
}
|
||||||
done := false
|
done := false
|
||||||
alreadyDownload := false
|
alreadyDownload := false
|
||||||
checksum := ""
|
checksum := ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user