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

multi: Go 1.19 doc comment formatting. #2976

Merged
merged 1 commit into from
Jul 30, 2022
Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jul 27, 2022

This modifies the entire repository to use the new formatting of doc comments in the upcoming Go 1.19 release.

The primary motivating factors for this are:

  • Builds check that files are formatted per gofmt and that will no longer be true as of Go 1.19 without these changes
  • Separating all the updates into a single commit ensures these documentation only formatting changes do not clutter up diffs that actually change code

For the most part, the changes are just the automated changes suggested by the Go 1.19 version of gofmt, but there are also a few cases where the comments were reworded a bit to play nicely with the new formatting requirements.

For example, the new version of gofmt reformats and collapses nested lists where as the existing version does not. Thus, instances of nested lists have been changed to either eliminate them or use mixed markers which produce expect results.

@davecgh davecgh added the documentation Issues and/or pull requests related to documentation. label Jul 27, 2022
@davecgh davecgh added this to the 1.8.0 milestone Jul 27, 2022
@chappjc
Copy link
Member

chappjc commented Jul 27, 2022

More importantly, my finding on dcrdex is that Go 1.18 doesn't revert this formatting so it is gofmt backward compatible, although I've not tested on this repo. It's worth the change.

This modifies the entire repository to use the new formatting of doc
comments in the upcoming Go 1.19 release.

The primary motivating factors for this are:

- Builds check that files are formatted per gofmt and that will no
  longer be true as of Go 1.19 without these changes
- Separating all the updates into a single commit ensures these
  documentation only formatting changes do not clutter up diffs that
  actually change code

For the most part, the changes are just the automated changes suggested
by the Go 1.19 version of gofmt, but there are also a few cases where
the comments were reworded a bit to play nicely with the new formatting
requirements.

For example, the new version of gofmt reformats and collapses nested
lists where as the existing version does not.  Thus, instances of nested
lists have been changed to either eliminate them or use mixed markers
which produce expect results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues and/or pull requests related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants