Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writer returns number of input bytes consumed, not output bytes written. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sam-mccall
Copy link

This matches the contract of io.Writer. Similar for WriteString.

Functions that only output SGR escapes no longer return the number of
bytes written. In addition to adding implementation complexity (they
can't be written in terms of Write()), the inconsistency in return
values would be confusing.

Fixes #1.

This matches the contract of `io.Writer`. Similar for `WriteString`.

Functions that *only* output SGR escapes no longer return the number of
bytes written. In addition to adding implementation complexity (they
can't be written in terms of `Write()`), the inconsistency in return
values would be confusing.
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.

1 participant