mirror of
https://github.com/golang/go
synced 2024-11-18 17:14:45 -07:00
The Go programming language
00f7cd5589
godoc formats function examples for text or HTML output by stripping the surrounding braces and un-indenting by replacing "\n " with "\n". This modifies the content of string literals, resulting in misleading examples. This change introduces a function, replaceLeadingIndentation, which unindents more carefully. It removes the first level of indentation only outside of string literals. For plain text output, it adds custom indentation at the beginning of every line including string literals. Fixes golang/go#18446 Change-Id: I52a7f5756bdb69c8a66f031452dd35eab947ec1f Reviewed-on: https://go-review.googlesource.com/36544 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
playground | ||
present | ||
refactor | ||
third_party | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README |
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go guru and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.