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/pkgsite: malformed function signature on LHS index #41486

Closed
cespare opened this issue Sep 18, 2020 · 3 comments
Closed

x/pkgsite: malformed function signature on LHS index #41486

cespare opened this issue Sep 18, 2020 · 3 comments

Comments

@cespare
Copy link
Contributor

@cespare cespare commented Sep 18, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/go-chi/chi

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36

Screenshot

screen_20200918125259

What did you do?

Navigated to a package page

What did you expect to see?

The signature of the function in question is

func (mx *Mux) Group(fn func(r Router)) Router

so if the LHS needs to abbreviate it perhaps it should be

(mx) Group(fn)

What did you see instead?

(mx) Group(fnfunc(r))

Which is weird because it has part of the argument type (which other signatures don't have) and because there's no space (so it reads fnfunc).

@gopherbot gopherbot added this to the Unreleased milestone Sep 18, 2020
@cespare cespare added the pkgsite label Sep 18, 2020
@gopherbot gopherbot added the go.dev label Sep 18, 2020
@ya5u
Copy link

@ya5u ya5u commented Sep 19, 2020

@cespare If it's abbreviated like any other method, the following style would be better in your example, I think.

(mx) Group(fn)
@cespare cespare changed the title x/pkgsite: missing space in function signature on LHS index x/pkgsite: malformed function signature on LHS index Sep 19, 2020
@cespare
Copy link
Contributor Author

@cespare cespare commented Sep 19, 2020

@ya5u yes, I suppose you're right. I updated the description.

@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@gopherbot gopherbot added the go.dev label Sep 19, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Sep 19, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 23, 2020

Change https://golang.org/cl/256580 mentions this issue: internal/fetch/dochtml: only show function pointer names in side nav

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

Successfully merging a pull request may close this issue.

None yet
5 participants