cwriter: add the blank wasm util and writer for building pass - #132
Open
Icemap wants to merge 2 commits into
Open
cwriter: add the blank wasm util and writer for building pass#132Icemap wants to merge 2 commits into
Icemap wants to merge 2 commits into
Conversation
added 2 commits
November 11, 2023 00:16
Solaris-star
left a comment
Contributor
There was a problem hiding this comment.
Reading this together with #133 — both add WASM/js build stubs for cwriter.
This PR (#132) uses the modern //go:build syntax which is correct for Go 1.17+. However, IsTerminal returning true unconditionally is misleading — in a WASM context there is no terminal, so returning false (and letting callers fall back to non-TTY output) would be more honest. GetSize returning (0, 0, nil) is fine.
The empty Writer struct with a no-op Flush is the right approach.
Since #133 is a superset of this (it also adds util_wasm.go with the ioctl const), I'd suggest consolidating into one PR. The //+build (old syntax) in #133 should be updated to //go:build to match this one.
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.