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

DebugPrint: Print the string value of tokens #1075

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

theclapp
Copy link
Sponsor Collaborator

In DebugPrint, if a value implements fmt.Stringer, and isn't a zero value, display its string value in addition to the default %#v format.

For the most part, this prints the string value of "tokens", e.g. for a syntax.Redirect.Op, instead of "Op: 0x3b", you get "Op: 0x3b (>&)".

In DebugPrint, if a value implements fmt.Stringer, and isn't a zero
value, display its string value in addition to the default %#v format.

For the most part, this prints the string value of "tokens", e.g. for a
syntax.Redirect.Op, instead of "Op: 0x3b", you get "Op: 0x3b (>&)".
Copy link
Owner

@mvdan mvdan left a comment

Choose a reason for hiding this comment

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

Thanks!

@mvdan mvdan merged commit a76dc6c into mvdan:master Apr 27, 2024
8 checks passed
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.

None yet

2 participants