vendor: github.com/docker/docker v24.0.0-rc.1.0.20230505222407-8d9a40a82034
This will be v24.0.0-rc.2 full diff: https://github.com/docker/docker/compare/v24.0.0-rc.1...8d9a40a820349860405e142249c55215aa4da8e3 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -3,7 +3,6 @@ package container
|
||||
import (
|
||||
"github.com/docker/cli/cli/command/formatter"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -23,7 +22,7 @@ func NewDiffFormat(source string) formatter.Format {
|
||||
}
|
||||
|
||||
// DiffFormatWrite writes formatted diff using the Context
|
||||
func DiffFormatWrite(ctx formatter.Context, changes []container.ContainerChangeResponseItem) error {
|
||||
func DiffFormatWrite(ctx formatter.Context, changes []container.FilesystemChange) error {
|
||||
render := func(format func(subContext formatter.SubContext) error) error {
|
||||
for _, change := range changes {
|
||||
if err := format(&diffContext{c: change}); err != nil {
|
||||
@ -37,7 +36,7 @@ func DiffFormatWrite(ctx formatter.Context, changes []container.ContainerChangeR
|
||||
|
||||
type diffContext struct {
|
||||
formatter.HeaderContext
|
||||
c container.ContainerChangeResponseItem
|
||||
c container.FilesystemChange
|
||||
}
|
||||
|
||||
func newDiffContext() *diffContext {
|
||||
@ -54,16 +53,7 @@ func (d *diffContext) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (d *diffContext) Type() string {
|
||||
var kind string
|
||||
switch d.c.Kind {
|
||||
case archive.ChangeModify:
|
||||
kind = "C"
|
||||
case archive.ChangeAdd:
|
||||
kind = "A"
|
||||
case archive.ChangeDelete:
|
||||
kind = "D"
|
||||
}
|
||||
return kind
|
||||
return d.c.Kind.String()
|
||||
}
|
||||
|
||||
func (d *diffContext) Path() string {
|
||||
|
||||
Reference in New Issue
Block a user