$ the-wire · showcase
PRINTF ANALYZER GETS SMARTER, PLAYGROUND NEEDS GO 1.26
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
The printf linter stops falsely flagging intentional double newlines, while gotip now requires Go 1.26 to bootstrap.
Go's printf analyzer has been fixed to stop reporting redundant newlines in Println calls [1]. The issue was real: when a string argument to Println already ends in a newline, Println adds another, creating two line breaks intentionally. This fix removes the false diagnostic and validates the corrected behavior. On the infrastructure side, the playground's gotip bootstrap has been updated to require Go 1.26 or later [2], as older versions now fail to build master. The modernize analyzer in gopls is being phased out in favor of the go fix command, with the deprecated gopls command slated for removal [3]. Meanwhile, tools continues stabilizing: generic method handling now properly normalizes instantiated callees to honor their declared contracts [4], and gopls completion logic no longer panics on edge cases in type information [5]. Supporting changes landed across cmd/vet, unusedfunc analysis, and pkgsite documentation updates.
Action items
- → Update playground deployment to bootstrap gotip with Go 1.26 or later golang/playground [immediate]
- → Migrate modernize usage from gopls internal command to go fix golang/tools [plan]
- → Sync golang/go with latest golang/x/tools for new vet checks golang/go [plan]
References
- [1] go/analysis/passes/printf: stop reporting trailing newlines in Println ↗ golang/tools
- [2] deploy: use latest Go version for gotip bootstrap ↗ golang/playground
- [3] go/analysis/passes/modernize: document 'go fix' command ↗ golang/tools
- [4] go/types/typeutil: normalize instantiated callees ↗ golang/tools
- [5] gopls/test/completion: fix reported bug in collectCompletions ↗ golang/tools