Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Integralist
Copy link
Collaborator

@Integralist Integralist commented Feb 21, 2024

PROBLEM:
Rendering a large bytes.Buffer using .String() with text.Output() fails to render any output.

SOLUTION:
Switch from text.Output() to fmt.Fprintln().

NOTES:
There is likely a bug in the underlying text.Output() implementation (as it has to parse line breaks and wrap the text at a predefined width) that makes it unsuitable for this particular output. Where as we only need a simple line-by-line output.

@Integralist Integralist added the bug Something isn't working label Feb 21, 2024
@Integralist Integralist changed the title fix(compute/serve): avoid text.Output when dealing with large buffer fix(compute/serve): avoid text.Output when dealing with large bytes.Buffer Feb 21, 2024
@Integralist Integralist merged commit a96a940 into main Feb 21, 2024
@Integralist Integralist deleted the integralist/fix-serve branch February 21, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants