-
Notifications
You must be signed in to change notification settings - Fork 264
Do not strip output comments from examples #614
Comments
It appears that something was missed in #238, because while } else if n != e.Play { Furthermore, gddo farms out most all of its cc: @garyburd and @LaPingvino, since you are the only two who have touched |
Why are those stripOutputComment necessary in doc.Example.Play? |
I would need to look through the git history to find an explanation of why output is being stripped, but my guess is that the author expected the Either way, since that is the behaviour of |
There is a bug in godoc atm about porting gddo's behavior for example code (golang/go#31669), which fix by @garyburd deferred to the Play code instead, so it might be a good idea to reevaluate that. If the output: stuff is the reason, it might be better to narrow the kind of comments that is stripped instead in that function and get godoc and gddo on the same page for this... |
Local godoc doesn't do this. I think its helpful for readers as an assertion for what the test should produce.
It also messes with the formatting. See https://godoc.org/nhooyr.io/websocket#ex-package--Echo
Because the output comment is stripped on the example, the example has an extra line at the end:
The text was updated successfully, but these errors were encountered: