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
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@cespare
Copy link
Contributor

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
@ya5u
Copy link

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 commented Sep 19, 2020

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

@julieqiu julieqiu removed the website label Sep 19, 2020
@julieqiu julieqiu removed the website label Sep 19, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Sep 19, 2020
@jba jba added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 19, 2020
@gopherbot
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants