aboutsummaryrefslogtreecommitdiff
path: root/_content/doc/tutorial/handle-errors.html
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2023-02-09 10:57:55 +1100
committerGopher Robot <gobot@golang.org>2023-02-09 03:13:06 +0000
commitf6b0140d3b6301f13134284de5208883d2a85b17 (patch)
tree6c49b547fd67b93712617e1896b4f90319428a36 /_content/doc/tutorial/handle-errors.html
parenta1c9012b542bb9285233aa48a6c8b73a24c3b6a9 (diff)
downloadgo-x-website-f6b0140d3b6301f13134284de5208883d2a85b17.tar.xz
internal/web: consistently remove OMIT lines from code blocks
OMIT lines may appear in code before or after the section intended to be displayed in a code block, however in the case of playground code blocks those lines are actually included. This change makes sure we always filter out the OMIT lines when generating code blocks, and adds a test. I noticed this when the playground snippets in the race detector blog post (https://go.dev/blog/race-detector) gave this error: package play: build constraints exclude all Go files in /tmp/sandbox2684341108 This is because those programs begin with the lines `// +build OMIT`, which were never intended to be executed. Change-Id: I5b0320da139741c789126f0c9d3dabc7044cd350 Reviewed-on: https://go-review.googlesource.com/c/website/+/466775 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to '_content/doc/tutorial/handle-errors.html')
0 files changed, 0 insertions, 0 deletions