Skip to content

Send deprecation warnings to stderr instead of stdout#1782

Merged
anthony-gomez-fastly merged 3 commits intomainfrom
chore-change-deprecation-warnings
May 8, 2026
Merged

Send deprecation warnings to stderr instead of stdout#1782
anthony-gomez-fastly merged 3 commits intomainfrom
chore-change-deprecation-warnings

Conversation

@anthony-gomez-fastly
Copy link
Copy Markdown
Member

Change summary

Previously, the text.Deprecated() function wrote warnings to stdout (via the provided io.Writer parameter), which mixed warnings with actual command output. This made it difficult for users to redirect output cleanly or for tools to parse stdout.

Changes:

  • Modified text.Deprecated() to write directly to os.Stderr
  • Added TestDeprecated() to verify stderr output
  • Updated test expectations to not check for deprecation messages in stdout

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

User Impact

No more deprecation warnings in stdOut

@anthony-gomez-fastly anthony-gomez-fastly requested a review from a team as a code owner May 8, 2026 13:57
Comment thread pkg/text/text.go
Previously, the text.Deprecated() function wrote warnings to stdout (via the provided io.Writer parameter), which mixed warnings with actual command output. This made it difficult for users to redirect output cleanly or for tools to parse stdout.

Changes:
- Modified text.Deprecated() to write directly to os.Stderr
- Added TestDeprecated() to verify stderr output
- Updated test expectations to not check for deprecation messages in stdout
@anthony-gomez-fastly anthony-gomez-fastly force-pushed the chore-change-deprecation-warnings branch from b14a38b to 856fba1 Compare May 8, 2026 14:04
@anthony-gomez-fastly anthony-gomez-fastly merged commit bacc844 into main May 8, 2026
13 checks passed
@anthony-gomez-fastly anthony-gomez-fastly deleted the chore-change-deprecation-warnings branch May 8, 2026 17:07
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