Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godoc: Add 'Unordered' labels to output blocks for Examples. #441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liquidgecka
Copy link

This change adds the "Unordered Output" label to examples that
are marked as such. This makes it clear that the output will
not necessarily be in a determined order from a given operation.

This change adds the "Unordered Output" label to examples that
are marked as such. This makes it clear that the output will
not necessarily be in a determined order from a given operation.
@liquidgecka
Copy link
Author

Unordered Output was added to examples in 2016, specifically allowing Example functions to define expected output, however mark it as not having a determined order (see the discussion here golang/go#10149).

The actual go change was implemented in 2016 (https://go-review.googlesource.com/c/go/+/19280) along with a change to godoc to show the Unordered label in the Output section (https://go-review.googlesource.com/c/tools/+/20458) however the godoc change broke basically everybody not running head at that time since godoc was attempting to use a field in a structure that only existed in the previous commit. The changes in godoc were reverted and the intention was to wait long enough for go users to have all successfully upgraded to a release that contains the new field.

That was 7 years ago. The field was included in go1.7 which means the vast majority of godoc users will have upgraded by now. Hopefully its now safe to try this again.

@gopherbot
Copy link
Contributor

This PR (HEAD: fa407a8) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/505475 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants