Backend: Improve labels, keywords and caching

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2020-05-28 21:20:42 +02:00
parent 4783183790
commit a77b2431d3
21 changed files with 129 additions and 31 deletions

View File

@@ -31,11 +31,12 @@ func Zip(filename string, files []string) error {
}
func AddToZip(zipWriter *zip.Writer, filename string) error {
fileToZip, err := os.Open(filename)
if err != nil {
return err
}
defer fileToZip.Close()
// Get the file information
@@ -64,6 +65,7 @@ func AddToZip(zipWriter *zip.Writer, filename string) error {
// Extract Zip file in destination directory
func Unzip(src, dest string) (fileNames []string, err error) {
r, err := zip.OpenReader(src)
if err != nil {
return fileNames, err
}