package main import ( "archive/zip" "io" "io/ioutil" "log" "os" "path/filepath" ) func Unzip(src, dest string) error { r, err := zip.OpenReader(src) if err != nil { return err } defer r.Close() for _, f := range r.File { rc, err := f.Open() if err != nil { return err } defer rc.Close() if f.FileInfo().IsDir() { path := filepath.Join(dest, f.Name) os.MkdirAll(path, f.Mode()) } else { buf := make([]