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

Comments

Projects
None yet
6 participants
@adg
Contributor

adg commented Mar 1, 2013

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

This comment has been minimized.

Contributor

adg commented Mar 18, 2013

Comment 1:

Labels changed: added godoc.

@gopherbot

This comment has been minimized.

gopherbot commented Mar 20, 2013

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

This comment has been minimized.

Contributor

griesemer commented Mar 20, 2013

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

gopherbot commented May 5, 2013

Comment 5 by aaron.l.france:

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

This comment has been minimized.

Member

4ad commented May 5, 2013

Comment 6:

No magic syntax. Just plain text.
@gopherbot

This comment has been minimized.

gopherbot commented May 6, 2013

Comment 7 by sedevelopers01:

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

adg commented Jul 9, 2013

Comment 9:

Issue #5852 has been merged into this issue.

@adg

This comment has been minimized.

Contributor

adg commented Aug 23, 2013

Comment 11:

Issue #6207 has been merged into this issue.

@rsc

This comment has been minimized.

Contributor

rsc commented Dec 4, 2013

Comment 12:

Labels changed: added repo-tools.

@rsc

This comment has been minimized.

Contributor

rsc commented Mar 3, 2014

Comment 13:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

@adg adg added accepted labels Mar 3, 2014

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc changed the title from cmd/godoc: link "package foo" and "foo package" in text when "foo" exists to 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

This comment has been minimized.

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

This comment has been minimized.

Contributor

griesemer commented Dec 12, 2018

Marking this 1.13 so it gets some visibility.

@griesemer griesemer modified the milestones: Unplanned, Go1.13 Dec 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment