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

Explictly do not support Windows, avoid error codes #6

Closed
wants to merge 3 commits into from
Closed

Explictly do not support Windows, avoid error codes #6

wants to merge 3 commits into from

Conversation

mkaz
Copy link

@mkaz mkaz commented Aug 21, 2019

The Windows console does not support the same ANSI character codes, so when they are printed out it ends up looking like gibberish characters.

This PR avoids this by simply returning blank strings for the functions. This removes all color syntax for windows builds only.

Explanation for setting up platform conditional builds is here:
https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool


This change is Reviewable

Copy link
Owner

@ttacon ttacon left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the PR! A few things to cleanup, overall looking good!

chalk_windows.go Outdated Show resolved Hide resolved
chalk_windows.go Outdated Show resolved Hide resolved
Copy link
Owner

@ttacon ttacon left a comment

Choose a reason for hiding this comment

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

One more question, otherwise LGTM.

// NewStyle creates a style starting with the current TextStyle
// as its text style.
func (t TextStyle) NewStyle() Style {
return &style{textStyle: t}
Copy link
Owner

Choose a reason for hiding this comment

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

Forgive me for my lack of Windows knowledge, should this be an empty string as well?

@mkaz mkaz closed this by deleting the head repository Feb 11, 2023
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.

3 participants