Skip to content

progressui: modify NewDisplay to accept io.Writer instead of console.File#4220

Merged
tonistiigi merged 1 commit into
moby:masterfrom
jsternberg:io-writer-display
Sep 12, 2023
Merged

progressui: modify NewDisplay to accept io.Writer instead of console.File#4220
tonistiigi merged 1 commit into
moby:masterfrom
jsternberg:io-writer-display

Conversation

@jsternberg
Copy link
Copy Markdown
Collaborator

The original intention of accepting console.File was that the current
uses of this function in the codebase were always files and it seemed
helpful to restrict the API to console.File to aid developers into
passing the correct output.

There are circumstances outside of the codebase where the io.Writer
versions are used so NewDisplay has now been adapted to take an
io.Writer to allow for those cases more easily.

Related to #4113 (comment).

@tonistiigi
Copy link
Copy Markdown
Member

@jsternberg Forgot DCO

…File

The original intention of accepting `console.File` was that the current
uses of this function in the codebase were always files and it seemed
helpful to restrict the API to `console.File` to aid developers into
passing the correct output.

There are circumstances outside of the codebase where the `io.Writer`
versions are used so `NewDisplay` has now been adapted to take an
`io.Writer` to allow for those cases more easily.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
@tonistiigi tonistiigi merged commit c8ac872 into moby:master Sep 12, 2023
@jsternberg jsternberg deleted the io-writer-display branch September 13, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants