mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-30 18:00:56 +01:00
refactor: code cleanup
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user