Proposals Unofficial Go proposal tracker

Stop converting plain quotes to smart quotes in doc comments

#76975 · cmd/gofmt · low impact · Implemented in Go 1.28 ·

Since Go 1.19, gofmt rewrites doc comments so that a pair of backquotes (``) becomes a left smart quote (“) and a pair of single quotes ('') becomes a right smart quote (”). This silently changes comment text into characters that are hard to type and easy to confuse with the originals. It also breaks code examples that use these characters and makes the original text impossible to find by searching.

The change removes smart-quote conversion entirely. go/format (and so gofmt and go fmt) will no longer insert smart quotes into source files. go/doc (and so go doc and pkgsite) will also stop converting plain quotes when rendering documentation, so the two stay consistent.

Proposal
#76975 by robpike
Status
Implemented on Jul 15, 2026
Release
Go 1.28
Impact
low
Area
cmd/gofmt