Skip to content

client/pkg/jsonmessage: add DisplayStream and DisplayMessages utils#52273

Merged
vvoland merged 2 commits intomoby:masterfrom
thaJeztah:jsonmessage_utils
Apr 1, 2026
Merged

client/pkg/jsonmessage: add DisplayStream and DisplayMessages utils#52273
vvoland merged 2 commits intomoby:masterfrom
thaJeztah:jsonmessage_utils

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

These can replace the existing DisplayJSONMessagesStream and DisplayJSONMessages functions, not requiring the caller to perform terminal detection.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

client/pkg/jsonmessage: add `DisplayStream` and `DisplayMessages` utils.

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. impact/changelog area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK module/client labels Mar 31, 2026
These can replace the existing DisplayJSONMessagesStream and DisplayJSONMessages
functions, not requiring the caller to perform terminal detection.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah requested a review from vvoland March 31, 2026 15:44
@thaJeztah thaJeztah added this to the 29.3.2 milestone Apr 1, 2026
defer res.Close()

buf := &strings.Builder{}
assert.NilError(t, err)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, this can be removed, not for this PR though

Suggested change
assert.NilError(t, err)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! I think I saw that one when I was working on this, but then ... forgot.

We should have a linter for that 🤔

@vvoland vvoland modified the milestones: 29.3.2, 29.4.0 Apr 1, 2026
@vvoland vvoland merged commit 631b6f9 into moby:master Apr 1, 2026
272 of 274 checks passed
@thaJeztah thaJeztah deleted the jsonmessage_utils branch April 1, 2026 12:02
@thaJeztah thaJeztah modified the milestones: 29.4.0, 29.3.2 Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. module/client status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants