refactor: code cleanup

This commit is contained in:
Marvin Zhang
2024-10-20 16:55:57 +08:00
parent 1b852fb96a
commit 4ac92d7eaf
33 changed files with 66 additions and 291 deletions

View File

@@ -6,7 +6,6 @@ import (
"encoding/hex"
"fmt"
"github.com/apex/log"
"github.com/crawlab-team/crawlab/core/constants"
"github.com/crawlab-team/crawlab/core/entity"
"io"
"io/fs"
@@ -211,13 +210,6 @@ func _Compress(file *os.File, prefix string, zw *zip.Writer) error {
return nil
}
func TrimFileData(data []byte) (res []byte) {
if string(data) == constants.EmptyFileData {
return res
}
return data
}
func ZipDirectory(dir, zipfile string) error {
zipFile, err := os.Create(zipfile)
if err != nil {