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

x/tools/cmd/godoc: link "package foo" and "foo package" in text when "foo" exists #4953

Open
adg opened this issue Mar 1, 2013 · 14 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@adg
Copy link
Contributor

adg commented Mar 1, 2013

It would be nice if godoc could automatically link text that refers to extant packages.
@adg
Copy link
Contributor Author

adg commented Mar 18, 2013

Comment 1:

Labels changed: added godoc.

@gopherbot
Copy link

Comment 2 by pedromorgan:

Yes please This is silly that its not there..
I cannot even create a summary text and link directly to types and functions etc.
Also missing is basic fomratting eg * for bullets and == for headings ==

@griesemer
Copy link
Contributor

Comment 3:

This request is somewhat underspecified to act upon. Questions to be answered:
1) What godoc text? Comments that shows up in documentation? Any godoc text (probably
not). Something else?
2) When does a package exist? When it's in the std lib? Somewhere else?
There already is a mechanism to highlight individual words in documentation comments,
for instance to connect the documentation to parameter names in the documented function
or method. That machinery is not used yet. It could be modified to do a bit more.

@adg
Copy link
Contributor Author

adg commented Mar 21, 2013

Comment 4:

1) Anything that we search for and linkify "http://example.com".
2) When godoc lists it in /pkg/.

@gopherbot
Copy link

Comment 5 by aaron.l.france:

Maybe a textual way to say "expand this symbol"?
Something like: `!`io.Reader`

@4ad
Copy link
Member

4ad commented May 5, 2013

Comment 6:

No magic syntax. Just plain text.

@gopherbot
Copy link

Comment 7 by sedevelopers01:

Why not markdown? It's conrete, easy-to-read and well-known.
http://daringfireball.net/projects/markdown/syntax

@adg
Copy link
Contributor Author

adg commented May 6, 2013

Comment 8:

It has been debated before. The conclusion is that we will not include any kind of
special syntax in godoc comments. The consensus is that they should read just like
regular comments, and require very little understanding of godoc's mechanisms to write
correctly.

@adg
Copy link
Contributor Author

adg commented Jul 9, 2013

Comment 9:

Issue #5852 has been merged into this issue.

@adg
Copy link
Contributor Author

adg commented Aug 23, 2013

Comment 11:

Issue #6207 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 12:

Labels changed: added repo-tools.

@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 13:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/godoc: link "package foo" and "foo package" in text when "foo" exists x/tools/cmd/godoc: link "package foo" and "foo package" in text when "foo" exists Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@kegsay
Copy link

kegsay commented Dec 12, 2018

I think this specific feature request is "in the spirit of" the simple GoDoc style requirements in the same way that http:// links are. They are regular comments that make sense on their own.

My use case is to be able to have well-documented package overviews which then link off to sub-packages for further reading. There is a concern that this could feature-creep (e.g. linking to a specific definition in a given package) but the simple case of linking to a package only seems pretty uncontroversial to me.

@griesemer
Copy link
Contributor

Marking this 1.13 so it gets some visibility.

@griesemer griesemer modified the milestones: Unplanned, Go1.13 Dec 12, 2018
@andybons andybons removed this from the Go1.13 milestone Jul 8, 2019
@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest labels Aug 20, 2022
@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

8 participants