Skip to content

Commit c9e2aa0

Browse files
Comment clarification
1 parent 64c31e8 commit c9e2aa0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/store/in-memory-store.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (s *inMemoryStore) List(ctx context.Context) ([]Image, error) {
114114

115115
}
116116

117-
// Create imageMap filled with all images from imageList
117+
// Create imageMap filled with all images from remote imageList
118118
imageMap := make(map[string]bool)
119119
for _, img := range imageList {
120120
imageMap[img.Reference] = true
@@ -123,14 +123,13 @@ func (s *inMemoryStore) List(ctx context.Context) ([]Image, error) {
123123
// Iterate over in memory store and remove any image that is not found in imageMap
124124
for digest, image := range s.images {
125125
if _, exists := imageMap[image]; !exists {
126-
// The image does not exist in imageList, so remove it from the store
127126
s.Remove(ctx, digest, image)
128127
}
129128
}
130129

131130
}
132131

133-
// Print out the entire store
132+
// Print out the entire store for debugging purposes
134133
fmt.Println("Current store:")
135134
for digest, imageRef := range s.images {
136135
fmt.Printf("Digest: %s, Image: %s\n", digest, imageRef)

0 commit comments

Comments
 (0)