On Tue, Feb 7, 2017 at 9:01 PM, Robert Hsiung <xiong0...@gmail.com> wrote: > Hi all: > I tried to upload file via SFTP,but the file size is zero when it is > done.Any suggestions? Thanks so much. > // Copy the file > > dstFile.WriteTo(srcFile) > > } >
You're writing the empty destination file to the srcFile. You probably want: n, err = dstFile.ReadFrom(srcFile) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.