Skip to content

Commit bf16dd1

Browse files
committed
vendor: docker/docker, moby/moby/api and moby/moby/client 4faedf2bec36
notable changes: - api: remove deprecated NoBaseImageSpecifier - api/stdcopy: move to api/pkg/stdcopy - api/types/container: add aliases for go-connections/nat types - pkg/progress: move to api/pkg/progress - pkg/jsonmessage: move JSONError to api/types/jsonstream - pkg/jsonmessage: move JSONProgress to api/types/jsonstream - pkg/jsonmessage: move to client/pkg/jsonmessage - pkg/jsonmessage: remove github.com/morikuni/aec dependency - pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail, remove DisplayJSONMessagesToStream and Stream interface - pkg/streamformatter: move to api/pkg/streamformatter - pkg/streamformatter: split from pkg/jsonmessage full diff: moby/moby@2574c2b...4faedf2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 2199a05 commit bf16dd1

File tree

28 files changed

+395
-296
lines changed

28 files changed

+395
-296
lines changed

cli/command/container/hijack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"sync"
99

1010
"github.com/docker/cli/cli/command"
11-
"github.com/moby/moby/api/stdcopy"
11+
"github.com/moby/moby/api/pkg/stdcopy"
1212
"github.com/moby/moby/client"
1313
"github.com/moby/term"
1414
"github.com/sirupsen/logrus"

cli/command/container/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/docker/cli/cli"
88
"github.com/docker/cli/cli/command"
99
"github.com/docker/cli/cli/command/completion"
10-
"github.com/moby/moby/api/stdcopy"
10+
"github.com/moby/moby/api/pkg/stdcopy"
1111
"github.com/moby/moby/api/types/container"
1212
"github.com/spf13/cobra"
1313
)

cli/command/container/run_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ import (
1616
"github.com/docker/cli/cli/streams"
1717
"github.com/docker/cli/internal/test"
1818
"github.com/docker/cli/internal/test/notary"
19-
"github.com/docker/docker/pkg/jsonmessage"
2019
"github.com/moby/moby/api/types"
2120
"github.com/moby/moby/api/types/container"
2221
"github.com/moby/moby/api/types/image"
22+
"github.com/moby/moby/api/types/jsonstream"
2323
"github.com/moby/moby/api/types/network"
2424
"github.com/moby/moby/client"
25+
"github.com/moby/moby/client/pkg/jsonmessage"
2526
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
2627
"github.com/spf13/pflag"
2728
"gotest.tools/v3/assert"
@@ -256,9 +257,11 @@ func TestRunPullTermination(t *testing.T) {
256257
TimeNano: time.Now().UnixNano(),
257258
Time: time.Now().Unix(),
258259
Progress: &jsonmessage.JSONProgress{
259-
Current: int64(i),
260-
Total: 100,
261-
Start: 0,
260+
Progress: jsonstream.Progress{
261+
Current: int64(i),
262+
Total: 100,
263+
Start: 0,
264+
},
262265
},
263266
}))
264267
time.Sleep(100 * time.Millisecond)

cli/command/image/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"github.com/docker/cli/cli/streams"
2121
"github.com/docker/cli/internal/jsonstream"
2222
"github.com/docker/cli/opts"
23-
"github.com/docker/docker/pkg/progress"
24-
"github.com/docker/docker/pkg/streamformatter"
2523
"github.com/moby/go-archive"
24+
"github.com/moby/moby/api/pkg/progress"
25+
"github.com/moby/moby/api/pkg/streamformatter"
2626
buildtypes "github.com/moby/moby/api/types/build"
2727
"github.com/moby/moby/api/types/container"
2828
registrytypes "github.com/moby/moby/api/types/registry"

cli/command/image/build/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
"time"
1818

1919
"github.com/docker/cli/cli/command/image/build/internal/git"
20-
"github.com/docker/docker/pkg/progress"
21-
"github.com/docker/docker/pkg/streamformatter"
2220
"github.com/moby/go-archive"
2321
"github.com/moby/go-archive/compression"
22+
"github.com/moby/moby/api/pkg/progress"
23+
"github.com/moby/moby/api/pkg/streamformatter"
2424
"github.com/moby/patternmatcher"
2525
"github.com/pkg/errors"
2626
)

cli/command/service/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/docker/cli/cli/command/formatter"
1717
"github.com/docker/cli/cli/command/idresolver"
1818
"github.com/docker/cli/internal/logdetails"
19-
"github.com/moby/moby/api/stdcopy"
19+
"github.com/moby/moby/api/pkg/stdcopy"
2020
"github.com/moby/moby/api/types/container"
2121
"github.com/moby/moby/api/types/swarm"
2222
"github.com/moby/moby/client"

cli/command/service/progress/progress.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"time"
1313

1414
"github.com/docker/cli/cli/command/formatter"
15-
"github.com/docker/docker/pkg/progress"
16-
"github.com/docker/docker/pkg/streamformatter"
15+
"github.com/moby/moby/api/pkg/progress"
16+
"github.com/moby/moby/api/pkg/streamformatter"
1717
"github.com/moby/moby/api/types/filters"
1818
"github.com/moby/moby/api/types/swarm"
1919
"github.com/moby/moby/client"

cli/command/service/progress/progress_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strconv"
66
"testing"
77

8-
"github.com/docker/docker/pkg/progress"
8+
"github.com/moby/moby/api/pkg/progress"
99
"github.com/moby/moby/api/types/swarm"
1010
"gotest.tools/v3/assert"
1111
is "gotest.tools/v3/assert/cmp"

cli/command/swarm/progress/root_rotation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"os/signal"
99
"time"
1010

11-
"github.com/docker/docker/pkg/progress"
12-
"github.com/docker/docker/pkg/streamformatter"
11+
"github.com/moby/moby/api/pkg/progress"
12+
"github.com/moby/moby/api/pkg/streamformatter"
1313
"github.com/moby/moby/api/types/swarm"
1414
"github.com/moby/moby/client"
1515
"github.com/opencontainers/go-digest"

internal/jsonstream/display.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import (
44
"context"
55
"io"
66

7-
"github.com/docker/docker/pkg/jsonmessage"
7+
"github.com/docker/cli/cli/streams"
8+
"github.com/moby/moby/api/types/jsonstream"
9+
"github.com/moby/moby/client/pkg/jsonmessage"
810
)
911

1012
type (
11-
Stream = jsonmessage.Stream
13+
JSONError = jsonstream.Error
1214
JSONMessage = jsonmessage.JSONMessage
13-
JSONError = jsonmessage.JSONError
1415
JSONProgress = jsonmessage.JSONProgress
1516
)
1617

@@ -46,7 +47,7 @@ func WithAuxCallback(cb func(JSONMessage)) Options {
4647
// "context aware" and appropriately returns why the function was canceled.
4748
//
4849
// It returns an error if the context is canceled, but not if the input reader / stream is closed.
49-
func Display(ctx context.Context, in io.Reader, stream Stream, opts ...Options) error {
50+
func Display(ctx context.Context, in io.Reader, stream *streams.Out, opts ...Options) error {
5051
if ctx.Err() != nil {
5152
return ctx.Err()
5253
}

0 commit comments

Comments
 (0)