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

Use golang.org/x/term for the IsTerminal() API #70

Closed

Conversation

debarshiray
Copy link

Packages from the golang.org domain are likely to be more widely used than github.com/mattn/go-isatty. Therefore, this can reduce the number of dependencies for consumers of github.com/mattn/go-colorable, who may already have golang.org/x/term in their dependency chain.

Newer versions of golang.org/x/term require Go versions more recent than 1.15 [1]. Therefore, the minimum needed version was carefully chosen to avoid bumping the Go version.

[1] golang.org/x/term commit a79de5458b56c188
golang/term@a79de5458b56c188
golang/go#36460

Packages from the golang.org domain are likely to be more widely used
than github.com/mattn/go-isatty.  Therefore, this can reduce the number
of dependencies for consumers of github.com/mattn/go-colorable, who may
already have golang.org/x/term in their dependency chain.

Newer versions of golang.org/x/term require Go versions more recent than
1.15 [1].  Therefore, the minimum needed version was carefully chosen to
avoid bumping the Go version.

[1] golang.org/x/term commit a79de5458b56c188
    golang/term@a79de5458b56c188
    golang/go#36460
@debarshiray
Copy link
Author

Related: briandowns/spinner#156

@debarshiray
Copy link
Author

Ping

@mattn
Copy link
Owner

mattn commented Jan 31, 2024

Supported OSs of x/term are not enough to replace go-isatty. ex: appengine, cygwin.

@mattn mattn closed this Jan 31, 2024
@debarshiray
Copy link
Author

Supported OSs of x/term are not enough to replace go-isatty. ex: appengine, cygwin.

I see. Thanks for looking into it!

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.

2 participants