Skip to content

Conversation

@pterjan
Copy link

@pterjan pterjan commented Jan 9, 2026

Go 1.24 no longer allows dynamic format string.

Fixes #459

Copy link
Collaborator

@tomasaschan tomasaschan left a comment

Choose a reason for hiding this comment

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

Thanks for contributing a fix here! But I think it would be better to use Fprint() which doesn't ask for a format string, rather than supplying "%s". (Output and behavior should be the same, but I think it's worth optimizing for code readability too...)

@pterjan
Copy link
Author

pterjan commented Jan 10, 2026

Totally agree, I searched for how to write a string to an io.Writer and couldn't find a method, but didn't think that fmt would have a function not doing formatting!

Go 1.24 no longer allows dynamic format string.
Copy link
Collaborator

@tomasaschan tomasaschan left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@tomasaschan tomasaschan merged commit b85eb9e into spf13:master Jan 10, 2026
6 checks passed
@pterjan pterjan deleted the patch-2 branch January 10, 2026 17:41
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.

Go 1.24: non-constant format strings break test build

2 participants