]> Cypherpunks repositories - gostls13.git/commit
all: untab /* */ doc comments
authorRuss Cox <rsc@golang.org>
Thu, 3 Feb 2022 16:50:45 +0000 (11:50 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 15 Mar 2022 17:17:30 +0000 (17:17 +0000)
commit1178255f8596ea503daf30c84c7c1039f755e7f0
treee406084e097b7fe28b30213f19f1c6a68d01f88b
parent9b112cec8363c0c574750d92cffe8682e80aacbe
all: untab /* */ doc comments

A long time ago, gofmt insisted on inserting tabs in /* */ comments
at the top level of the file, like this:

/*
Package doc comment.
*/
package p

Gofmt still insists on the tab for comments not at top level,
but it has relaxed the rules about top-level comments.
A few very old doc comments are indented, left over from the old rule.

We are considering formatting doc comments, and so to make
everything consistent, standardize on unindented doc comments
by removing tabs in the few doc comments that are still indented this way.

Also update some cmd/gofmt testdata to match.

Change-Id: I293742e39b52f8a48ec41f72ca4acdafa7ce43bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/384261
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/builtin/builtin.go
src/cmd/gofmt/testdata/crlf.golden
src/cmd/gofmt/testdata/crlf.input
src/cmd/gofmt/testdata/typeswitch.golden
src/cmd/gofmt/testdata/typeswitch.input
src/flag/flag.go
src/fmt/doc.go
src/go/doc/headscan.go
src/net/rpc/server.go
src/runtime/debug/stack_test.go
src/unsafe/unsafe.go