Skip to content

Commit fe217ab

Browse files
committed
Merge branch 'main' into pinglanlu/main
2 parents 9c35138 + 7a0b958 commit fe217ab

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cmd/nerdctl/container/container_diff.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ func getChanges(ctx context.Context, client *containerd.Client, container contai
197197
return changes, err
198198
}
199199

200-
func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
201-
newDir, _ := filepath.Split(new.Path)
200+
func appendChanges(changes []fs.Change, fsChange fs.Change) []fs.Change {
201+
newDir, _ := filepath.Split(fsChange.Path)
202202
newDirPath := filepath.SplitList(newDir)
203203

204204
if len(changes) == 0 {
@@ -208,7 +208,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
208208
Path: filepath.Join(newDirPath[:i+1]...),
209209
})
210210
}
211-
return append(changes, new)
211+
return append(changes, fsChange)
212212
}
213213
last := changes[len(changes)-1]
214214
lastDir, _ := filepath.Split(last.Path)
@@ -222,7 +222,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
222222
Path: filepath.Join(newDirPath[:i+1]...),
223223
})
224224
}
225-
return append(changes, new)
225+
return append(changes, fsChange)
226226
}
227227

228228
func diffShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

pkg/imgutil/filtering.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,12 @@ func filter[T any](items []T, f func(item T) (bool, error)) ([]T, error) {
302302
return filteredItems, nil
303303
}
304304

305-
func imageCreatedBetween(image images.Image, min time.Time, max time.Time) bool {
306-
return image.CreatedAt.After(min) && image.CreatedAt.Before(max)
305+
func imageCreatedBetween(image images.Image, minTime time.Time, maxTime time.Time) bool {
306+
return image.CreatedAt.After(minTime) && image.CreatedAt.Before(maxTime)
307307
}
308308

309-
func imageCreatedBefore(image images.Image, max time.Time) bool {
310-
return image.CreatedAt.Before(max)
309+
func imageCreatedBefore(image images.Image, maxTime time.Time) bool {
310+
return image.CreatedAt.Before(maxTime)
311311
}
312312

313313
func matchesAllLabels(imageCfgLabels map[string]string, filterLabels map[string]string) bool {

0 commit comments

Comments
 (0)