Skip to content

Commit 6811330

Browse files
committed
Merge branch 'main' of https://github.com/containerd/nerdctl into tinamor/fix-build-with-tty
2 parents 0a72edd + 4d945c1 commit 6811330

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
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) {

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/containerd/console v1.0.4
1818
github.com/containerd/containerd/api v1.8.0
1919
github.com/containerd/containerd/v2 v2.0.0
20-
github.com/containerd/continuity v0.4.4
20+
github.com/containerd/continuity v0.4.5
2121
github.com/containerd/errdefs v1.0.0
2222
github.com/containerd/fifo v1.1.0
2323
github.com/containerd/go-cni v1.1.10

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ github.com/containerd/containerd/api v1.8.0 h1:hVTNJKR8fMc/2Tiw60ZRijntNMd1U+JVM
3535
github.com/containerd/containerd/api v1.8.0/go.mod h1:dFv4lt6S20wTu/hMcP4350RL87qPWLVa/OHOwmmdnYc=
3636
github.com/containerd/containerd/v2 v2.0.0 h1:qLDdFaAykQrIyLiqwQrNLLz95wiC36bAZVwioUwqShM=
3737
github.com/containerd/containerd/v2 v2.0.0/go.mod h1:j25kDy9P48/ngb1sxWIFfK6GsnqOHoSqo1EpAod20VQ=
38-
github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII=
39-
github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
38+
github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4=
39+
github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
4040
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
4141
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
4242
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=

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 {

pkg/netutil/subnet/subnet.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ func LastIPInSubnet(addr *net.IPNet) (net.IP, error) {
111111
}
112112
ones, bits := cidr.Mask.Size()
113113
if ones == bits {
114-
return cidr.IP, err
114+
return cidr.IP, nil
115115
}
116116
for i := range cidr.IP {
117117
cidr.IP[i] = cidr.IP[i] | ^cidr.Mask[i]
118118
}
119-
return cidr.IP, err
119+
return cidr.IP, nil
120120
}
121121

122122
// firstIPInSubnet gets the first IP in a subnet
@@ -129,8 +129,8 @@ func FirstIPInSubnet(addr *net.IPNet) (net.IP, error) {
129129
}
130130
ones, bits := cidr.Mask.Size()
131131
if ones == bits {
132-
return cidr.IP, err
132+
return cidr.IP, nil
133133
}
134134
cidr.IP[len(cidr.IP)-1]++
135-
return cidr.IP, err
135+
return cidr.IP, nil
136136
}

0 commit comments

Comments
 (0)