aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2022-02-10 10:32:58 -0500
committerJonathan Amsterdam <jba@google.com>2022-05-10 14:22:16 +0000
commit59ef3a966b38cb2ac537d1be43f0b8fd2468ea70 (patch)
tree95b4a5f1dd02363de0bc3bbab7a7bcf553eaf588 /src/os/exec
parent1ce7fcf139417d618c2730010ede2afb41664211 (diff)
downloadgo-59ef3a966b38cb2ac537d1be43f0b8fd2468ea70.tar.xz
go/doc: group play example imports
When synthesizing a program from a playable example, preserve the grouping of imports. That is, maintain blank lines between imports while removing unused ones. People are used to having those groups because that is what goimports does. It's disconcerting to see the all imports placed together, as the existing code does, especially when the user has already grouped them. For an example, see golang/go#43658. This is an improvement to a fix in pkgsite's fork of go/doc (https://go.googlesource.com/pkgsite/+/7b10ef3861af4a863bf215f63b6de94c681d5af0/internal/godoc/internal/doc/example_pkgsite.go#405). Here I've managed to avoid using a token.FileSet. Change-Id: I65605e6dd53d742a3fe1210c3f982b54e3706198 Reviewed-on: https://go-review.googlesource.com/c/go/+/384837 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'src/os/exec')
0 files changed, 0 insertions, 0 deletions