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

doc: consider altering // mage:import documentation to remove leading space #406

Closed
efd6 opened this issue Feb 23, 2022 · 2 comments · Fixed by #407
Closed

doc: consider altering // mage:import documentation to remove leading space #406

efd6 opened this issue Feb 23, 2022 · 2 comments · Fixed by #407

Comments

@efd6
Copy link
Contributor

efd6 commented Feb 23, 2022

The "mage:import" directive comment looks very much like it falls in the family of directive comments used by the compiler and other tools, for example linters (see golang/go#43776).

However it specifies in the documentation that a leading space should be included. The code specifically does not require this, so I would like to suggest that the documentation be changed to exclude the space.

This would have no backward incompatibility issues due to the current acceptance of the no-space variant, but over time would allow the Go community to converge on a consensus approach to using directive comments.

@natefinch
Copy link
Member

This is a good point. I think changing the recommendation is probably a good idea.

@efd6
Copy link
Contributor Author

efd6 commented Feb 24, 2022

There is also the issue of the move to bug resistant build tags which should be finalised by 1.18 according to the issue. I will send a PR in two commit, the first handling the original issue and the second adjusting docs for the //go:build tags, but leaving ~all the code alone, I can back out the second commit if you don't want it.

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

Successfully merging a pull request may close this issue.

2 participants