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 link #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

godoc link #24

wants to merge 2 commits into from

Conversation

ccoVeille
Copy link
Contributor

  • feat: use comment.Parse to parse document as Markdown
  • chore: refactor code to use an helper

Fixes #17

@ccoVeille
Copy link
Contributor Author

Did you have a chance to review?

@chocolacula
Copy link
Owner

I’ll try to review this weekend

@chocolacula
Copy link
Owner

Could you please give me an example how it affect the documentation. With and without this change.

@ccoVeille
Copy link
Contributor Author

ccoVeille commented Dec 15, 2024

Sure

  • Take any godoc
  • add a godoc link, so something like [fmt.Stringer]
  • generate documentation

You can think about more complex link, even in the current package.

For example, in your package you can add something like called by [NewPackage]

More information here

https://golang.org/doc/comment#doclinks

@ccoVeille
Copy link
Contributor Author

About the rendering

Take a look here

https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/encoding/json/encode.go;l=36

You will see the godoc links in the godoc of Marshal

And here you can see the rendering
https://pkg.go.dev/encoding/json#Marshal

Screenshot_20241215_140537_Firefox.jpg

Everything I underlined in yellow are the rendered godoc links

@chocolacula
Copy link
Owner

I see the problem, agree, this feature is needed but not sure in the implementation. Need some time to rethink.

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.

stdlib godoc links supports
2 participants