formatter package heavy refactoring
- make it possible to extract the formatter implementation from the "common" code, that way, the formatter package stays small - extract some formatter into their own packages This is essentially moving the "formatter" implementation of each type in their respective packages. The *main* reason to do that, is to be able to depend on `cli/command/formatter` without depending of the implementation detail of the formatter. As of now, depending on `cli/command/formatter` means we depend on `docker/docker/api/types`, `docker/licensing`, … — that should not be the case. `formatter` should hold the common code (or helpers) to easily create formatter, not all formatter implementations. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@ -41,7 +41,7 @@ func runDiff(dockerCli command.Cli, opts *diffOptions) error {
|
||||
}
|
||||
diffCtx := formatter.Context{
|
||||
Output: dockerCli.Out(),
|
||||
Format: formatter.NewDiffFormat("{{.Type}} {{.Path}}"),
|
||||
Format: NewDiffFormat("{{.Type}} {{.Path}}"),
|
||||
}
|
||||
return formatter.DiffWrite(diffCtx, changes)
|
||||
return DiffFormatWrite(diffCtx, changes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user