Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix: comment unused function idMap.remove() to suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
elijaharita committed Nov 7, 2023
1 parent c62a001 commit f1ba9e5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions integration/singularity/id_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,17 @@ func (im *idMap) get(blobID blob.ID) (int64, error) {
return int64(fileID), nil
}

// Removes blob ID to Singularity ID mapping. If no ID file existed,
// blob.ErrBlobNotFound will be returned.
func (im *idMap) remove(blobID blob.ID) error {
if err := os.Remove(im.path(blobID)); err != nil {
if errors.Is(err, os.ErrNotExist) {
return blob.ErrBlobNotFound
}
// TODO: currently commented to silence unused warning
// // Removes blob ID to Singularity ID mapping. If no ID file existed,
// // blob.ErrBlobNotFound will be returned.
// func (im *idMap) remove(blobID blob.ID) error {
// if err := os.Remove(im.path(blobID)); err != nil {
// if errors.Is(err, os.ErrNotExist) {
// return blob.ErrBlobNotFound
// }

return fmt.Errorf("could not read ID file: %w", err)
}
// return fmt.Errorf("could not read ID file: %w", err)
// }

return nil
}
// return nil
// }

0 comments on commit f1ba9e5

Please sign in to comment.