chore(lint): address linter
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user