hnakamur / go-scp

[Unmaintained] A scp client library written in Go
MIT License
41 stars 23 forks source link

SCP.SendDir() is hard to read #9

Open fugr opened 7 years ago

fugr commented 7 years ago

It's hard to read the code in SCP.SendDir() (https://github.com/hnakamur/go-scp/blob/master/source.go#L74), File.Readdir (https://golang.org/pkg/os/#File.Readdir) would help to simplify the code. And FileInfo (https://github.com/hnakamur/go-scp/blob/master/fileinfo.go#L10) is no longer needed

hnakamur commented 7 years ago

I agree it's hard to read code in SCP.SendDir(). Could you elaborate FileInfo is no longer needed? Anyway, pull requests are welcome.

fugr commented 7 years ago

I mean after use File.Readdir,FileInfo is no longer needed. I will try to implements it when i available,it's seems very comlicated.