chore(lint): address linter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-26 19:56:59 -04:00
parent 546600db93
commit db9629a618
10 changed files with 18 additions and 13 deletions

View File

@@ -121,7 +121,7 @@ func getGBooksMetadata(metadataSearch MetadataInfo) ([]MetadataInfo, error) {
func saveGBooksCover(gbid string, coverFilePath string, overwrite bool) error {
// Validate File Doesn't Exists
_, err := os.Stat(coverFilePath)
if err == nil && overwrite == false {
if err == nil && !overwrite {
log.Warn("File Alreads Exists")
return nil
}

View File

@@ -49,8 +49,8 @@ func hookAPI() *details {
}
// Convert to JSON Response
var responseData map[string]interface{}
json.Unmarshal([]byte(rawResp), &responseData)
var responseData map[string]any
_ = json.Unmarshal([]byte(rawResp), &responseData)
// Return Response
return httpmock.NewJsonResponse(200, responseData)

View File

@@ -109,6 +109,9 @@ func GetMetadata(filepath string) (*MetadataInfo, error) {
// Acquire Metadata
metadataInfo, err := handler(filepath)
if err != nil {
return nil, fmt.Errorf("unable to acquire metadata")
}
// Calculate MD5 & Partial MD5
partialMD5, err := utils.CalculatePartialMD5(filepath)