is there a easy way to unzip file with golang ?
right now my code is:
func Unzip(src, dest string) error {
r, err := zip.OpenReader(src)
if err !
I have been doing some browsing of google and repeatedly found people saying that there is no library that can handle that. Maybe I missed a custom repository in my search though and someone else will find it for us.
You may be able to make use of io.Copy(src, dest) to ease the process but I haven't tested it at all.
For instance:
os.MkDirAll(dest, r.File.Mode)
d, _ := os.Open(dest)
io.Copy(r.File, d)
Honestly to me your code looks pretty nice and if I were to do an Extract function myself (and the above doesn't work) then I would probably take a page from your book.