Skip to content

Commit b382401

Browse files
committed
vendor: github.com/moby/moby/api v1.52.0-rc.1, moby/client v0.1.0-rc.1
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c4f240c commit b382401

File tree

14 files changed

+161
-200
lines changed

14 files changed

+161
-200
lines changed

cli/command/container/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func interactiveExec(ctx context.Context, dockerCli command.Cli, execOptions *cl
201201
return getExecExitStatus(ctx, apiClient, execID)
202202
}
203203

204-
func getExecExitStatus(ctx context.Context, apiClient client.ContainerAPIClient, execID string) error {
204+
func getExecExitStatus(ctx context.Context, apiClient client.ExecAPIClient, execID string) error {
205205
resp, err := apiClient.ExecInspect(ctx, execID, client.ExecInspectOptions{})
206206
if err != nil {
207207
// If we can't connect, then the daemon probably died.

cli/command/container/tty.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ import (
1414
"github.com/sirupsen/logrus"
1515
)
1616

17+
// TODO(thaJeztah): split resizeTTYTo
18+
type resizeClient interface {
19+
client.ExecAPIClient
20+
client.ContainerAPIClient
21+
}
22+
1723
// resizeTTYTo resizes TTY to specific height and width.
18-
func resizeTTYTo(ctx context.Context, apiClient client.ContainerAPIClient, id string, height, width uint, isExec bool) error {
24+
func resizeTTYTo(ctx context.Context, apiClient resizeClient, id string, height, width uint, isExec bool) error {
1925
if height == 0 && width == 0 {
2026
return nil
2127
}

cli/command/formatter/disk_usage.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
)
1717

1818
const (
19-
defaultDiskUsageImageTableFormat = "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedSince}}\t{{.Size}}\t{{.SharedSize}}\t{{.UniqueSize}}\t{{.Containers}}"
20-
defaultDiskUsageContainerTableFormat = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.LocalVolumes}}\t{{.Size}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}"
21-
defaultDiskUsageVolumeTableFormat = "table {{.Name}}\t{{.Links}}\t{{.Size}}"
22-
defaultDiskUsageBuildCacheTableFormat = "table {{.ID}}\t{{.CacheType}}\t{{.Size}}\t{{.CreatedSince}}\t{{.LastUsedSince}}\t{{.UsageCount}}\t{{.Shared}}"
23-
defaultDiskUsageTableFormat = "table {{.Type}}\t{{.TotalCount}}\t{{.Active}}\t{{.Size}}\t{{.Reclaimable}}"
19+
defaultDiskUsageImageTableFormat Format = "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedSince}}\t{{.Size}}\t{{.SharedSize}}\t{{.UniqueSize}}\t{{.Containers}}"
20+
defaultDiskUsageContainerTableFormat Format = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.LocalVolumes}}\t{{.Size}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}"
21+
defaultDiskUsageVolumeTableFormat Format = "table {{.Name}}\t{{.Links}}\t{{.Size}}"
22+
defaultDiskUsageBuildCacheTableFormat Format = "table {{.ID}}\t{{.CacheType}}\t{{.Size}}\t{{.CreatedSince}}\t{{.LastUsedSince}}\t{{.UsageCount}}\t{{.Shared}}"
23+
defaultDiskUsageTableFormat Format = "table {{.Type}}\t{{.TotalCount}}\t{{.Active}}\t{{.Size}}\t{{.Reclaimable}}"
2424

2525
typeHeader = "TYPE"
2626
totalHeader = "TOTAL"
@@ -42,10 +42,10 @@ type DiskUsageContext struct {
4242
VolumeDiskUsage client.VolumesDiskUsage
4343
}
4444

45-
func (ctx *DiskUsageContext) startSubsection(format string) (*template.Template, error) {
45+
func (ctx *DiskUsageContext) startSubsection(format Format) (*template.Template, error) {
4646
ctx.buffer = &bytes.Buffer{}
4747
ctx.header = ""
48-
ctx.Format = Format(format)
48+
ctx.Format = format
4949
ctx.preFormat()
5050

5151
return ctx.parseFormat()
@@ -69,7 +69,7 @@ func NewDiskUsageFormat(source string, verbose bool) Format {
6969
{{end -}}`
7070
return format
7171
case !verbose && source == TableFormatKey:
72-
return Format(defaultDiskUsageTableFormat)
72+
return defaultDiskUsageTableFormat
7373
case !verbose && source == RawFormatKey:
7474
format := `type: {{.Type}}
7575
total: {{.TotalCount}}
@@ -96,8 +96,8 @@ func (ctx *DiskUsageContext) Write() (err error) {
9696
}
9797

9898
err = ctx.contextFormat(tmpl, &diskUsageImagesContext{
99-
totalCount: ctx.ImageDiskUsage.TotalImages,
100-
activeCount: ctx.ImageDiskUsage.ActiveImages,
99+
totalCount: ctx.ImageDiskUsage.TotalCount,
100+
activeCount: ctx.ImageDiskUsage.ActiveCount,
101101
totalSize: ctx.ImageDiskUsage.TotalSize,
102102
reclaimable: ctx.ImageDiskUsage.Reclaimable,
103103
images: ctx.ImageDiskUsage.Items,
@@ -106,8 +106,8 @@ func (ctx *DiskUsageContext) Write() (err error) {
106106
return err
107107
}
108108
err = ctx.contextFormat(tmpl, &diskUsageContainersContext{
109-
totalCount: ctx.ContainerDiskUsage.TotalContainers,
110-
activeCount: ctx.ContainerDiskUsage.ActiveContainers,
109+
totalCount: ctx.ContainerDiskUsage.TotalCount,
110+
activeCount: ctx.ContainerDiskUsage.ActiveCount,
111111
totalSize: ctx.ContainerDiskUsage.TotalSize,
112112
reclaimable: ctx.ContainerDiskUsage.Reclaimable,
113113
containers: ctx.ContainerDiskUsage.Items,
@@ -117,8 +117,8 @@ func (ctx *DiskUsageContext) Write() (err error) {
117117
}
118118

119119
err = ctx.contextFormat(tmpl, &diskUsageVolumesContext{
120-
totalCount: ctx.VolumeDiskUsage.TotalVolumes,
121-
activeCount: ctx.VolumeDiskUsage.ActiveVolumes,
120+
totalCount: ctx.VolumeDiskUsage.TotalCount,
121+
activeCount: ctx.VolumeDiskUsage.ActiveCount,
122122
totalSize: ctx.VolumeDiskUsage.TotalSize,
123123
reclaimable: ctx.VolumeDiskUsage.Reclaimable,
124124
volumes: ctx.VolumeDiskUsage.Items,
@@ -128,8 +128,8 @@ func (ctx *DiskUsageContext) Write() (err error) {
128128
}
129129

130130
err = ctx.contextFormat(tmpl, &diskUsageBuilderContext{
131-
totalCount: ctx.BuildCacheDiskUsage.TotalBuildCacheRecords,
132-
activeCount: ctx.BuildCacheDiskUsage.ActiveBuildCacheRecords,
131+
totalCount: ctx.BuildCacheDiskUsage.TotalCount,
132+
activeCount: ctx.BuildCacheDiskUsage.ActiveCount,
133133
builderSize: ctx.BuildCacheDiskUsage.TotalSize,
134134
reclaimable: ctx.BuildCacheDiskUsage.Reclaimable,
135135
buildCache: ctx.BuildCacheDiskUsage.Items,
@@ -226,7 +226,7 @@ func (ctx *DiskUsageContext) verboseWriteTable(duc *diskUsageContext) error {
226226
if err != nil {
227227
return err
228228
}
229-
ctx.Output.Write([]byte("Images space usage:\n\n"))
229+
_, _ = ctx.Output.Write([]byte("Images space usage:\n\n"))
230230
for _, img := range duc.Images {
231231
if err := ctx.contextFormat(tmpl, img); err != nil {
232232
return err
@@ -238,7 +238,7 @@ func (ctx *DiskUsageContext) verboseWriteTable(duc *diskUsageContext) error {
238238
if err != nil {
239239
return err
240240
}
241-
ctx.Output.Write([]byte("\nContainers space usage:\n\n"))
241+
_, _ = ctx.Output.Write([]byte("\nContainers space usage:\n\n"))
242242
for _, c := range duc.Containers {
243243
if err := ctx.contextFormat(tmpl, c); err != nil {
244244
return err

vendor.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ require (
2828
github.com/google/uuid v1.6.0
2929
github.com/mattn/go-runewidth v0.0.19
3030
github.com/moby/go-archive v0.1.0
31-
github.com/moby/moby/api v1.52.0-beta.4.0.20251106221347-217fd7890581
32-
github.com/moby/moby/client v0.1.0-beta.3.0.20251106221347-217fd7890581
31+
github.com/moby/moby/api v1.52.0-rc.1
32+
github.com/moby/moby/client v0.1.0-rc.1
3333
github.com/moby/patternmatcher v0.6.0
3434
github.com/moby/swarmkit/v2 v2.1.1
3535
github.com/moby/sys/atomicwriter v0.1.0

vendor.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N
113113
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
114114
github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
115115
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
116-
github.com/moby/moby/api v1.52.0-beta.4.0.20251106221347-217fd7890581 h1:Qa8MTSJUIV0K8sbG3RgJeEp5Q0GzWIVCKtalKpWewPo=
117-
github.com/moby/moby/api v1.52.0-beta.4.0.20251106221347-217fd7890581/go.mod h1:v0K/motq8oWmx+rtApG1rBTIpQ8KUONUjpf+U73gags=
118-
github.com/moby/moby/client v0.1.0-beta.3.0.20251106221347-217fd7890581 h1:pW39Fs9C96BH5ZRzwYLrIXNtFLuD0V72BkJHpwtcC/E=
119-
github.com/moby/moby/client v0.1.0-beta.3.0.20251106221347-217fd7890581/go.mod h1:py3jWFsk61C4EZ1Cv8zgbv7nsJ6NjGzZFVdPoSSJ3NE=
116+
github.com/moby/moby/api v1.52.0-rc.1 h1:yiNz/QzD4Jr1gyKl2iMo7OCZwwY+Xb3BltKv1xipwXo=
117+
github.com/moby/moby/api v1.52.0-rc.1/go.mod h1:v0K/motq8oWmx+rtApG1rBTIpQ8KUONUjpf+U73gags=
118+
github.com/moby/moby/client v0.1.0-rc.1 h1:NfuQec3HvQkPf4EvVkoFGPsBvlAc8CCyQN1m1kGSEX8=
119+
github.com/moby/moby/client v0.1.0-rc.1/go.mod h1:qYzoKHz8qu4Ie1j41CWYhfNRHo8uhs5ay7cfx309Aqc=
120120
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
121121
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
122122
github.com/moby/swarmkit/v2 v2.1.1 h1:yvTJ8MMCc3f0qTA44J6R59EZ5yZawdYopkpuLk4+ICU=

vendor/github.com/moby/moby/api/types/build/disk_usage.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/moby/api/types/container/disk_usage.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/moby/api/types/image/disk_usage.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/moby/api/types/volume/disk_usage.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)