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

net: Corrected status() method comment to indicate return of Status enum field instead of struct. #21735

Merged

Conversation

carlosaherrera
Copy link
Contributor

The status() method comment states it returns a Status struct. This is incorrect. It in fact returns a field of the Status enum. I have updated the comment to reflect this and used wording to be consistent with

// status_from_int returns the corresponding enum field of Status
.

@carlosaherrera
Copy link
Contributor Author

Question. https://modules.vlang.io/net.http.html#Response.status has the same issue. Is the documentation derived from the source code? If so, then it should be safe to say this change of mine will be reflected in the documentation automatically.

@carlosaherrera
Copy link
Contributor Author

Question. https://modules.vlang.io/net.http.html#Response.status has the same issue. Is the documentation derived from the source code? If so, then it should be safe to say this change of mine will be reflected in the documentation automatically.

I found my answer

vdoc will generate it from docstrings in the source code

src: https://github.com/vlang/v/blob/master/doc/docs.md#writing-documentation

@spytheman spytheman merged commit 094c30c into vlang:master Jun 26, 2024
64 checks passed
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 this pull request may close these issues.

None yet

2 participants