Merged in feature/linting (pull request #168)
Linting Updates * precommit * smallerchecks * govuln
This commit is contained in:
@@ -98,7 +98,7 @@ func (s *Service) getBytesBuffer(ctx context.Context, params *CleanParams, start
|
||||
buffer := make([]byte, length)
|
||||
n, err := out.Body.Read(buffer)
|
||||
if err != nil && n == 0 {
|
||||
return nil, fmt.Errorf("unable to read object body: %v", err)
|
||||
return nil, fmt.Errorf("unable to read object body: %w", err)
|
||||
}
|
||||
|
||||
return buffer[:n], nil
|
||||
|
||||
@@ -13,13 +13,13 @@ import (
|
||||
func (s *Service) Clean(ctx context.Context, documentId uuid.UUID) error {
|
||||
isclean, err := s.cfg.GetDBQueries().HasDocumentCleanEntry(ctx, documentId)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to verify if document has been cleaned: %s", err)
|
||||
return fmt.Errorf("unable to verify if document has been cleaned: %w", err)
|
||||
}
|
||||
|
||||
if !isclean {
|
||||
err = s.clean(ctx, documentId)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to clean document: %s", err)
|
||||
return fmt.Errorf("unable to clean document: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user