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/godoc/static, x/website/content/static: missing "or" function call in package.html template #35812

Closed
smasher164 opened this issue Nov 24, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@smasher164
Copy link
Member

@smasher164 smasher164 commented Nov 24, 2019

For instance, https://golang.org/pkg/crypto/ displays all of the package's subdirectories above the footer, like so
image

However, https://tip.golang.org/pkg/crypto/ does not display the package's subdirectories and positions the "Name" and "Sypnosis" columns underneath the footer, like so
image

EDIT: /cc @andybons

@smasher164 smasher164 added the NeedsFix label Nov 24, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 24, 2019
@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Nov 24, 2019

@dmitshur

@dmitshur dmitshur changed the title x/website: package subdirectories are not visible on tip.golang.org x/build/cmd/tip: package subdirectories are not visible on tip.golang.org Nov 25, 2019
@gopherbot gopherbot added the Builders label Nov 25, 2019
@dmitshur dmitshur self-assigned this Nov 25, 2019
@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Nov 25, 2019

There was a problem in the package.html template that is starting to be caught in Go 1.14. Can be reproduced with gotip run golang.org/x/website/cmd/golang and visiting the page. Evaluating the package.html template produces an error:

2019/11/25 12:32:29 packageHTML.Execute: template: package.html:217:13: executing "package.html" at <(eq $.Dirname "/src/cmd") $.DirFlat>: can't give argument to non-function eq $.Dirname "/src/cmd"

The error is in the following line of package.html template:

{{if not ((eq $.Dirname "/src/cmd") $.DirFlat)}}

It should instead be:

{{if not (or (eq $.Dirname "/src/cmd") $.DirFlat)}}

This change happened in CL 101295, where the intention was to remove the (eq $.Dirname "/src") condition as far as I understand. /cc @agnivade

@dmitshur dmitshur changed the title x/build/cmd/tip: package subdirectories are not visible on tip.golang.org x/tools/godoc/static, x/website/content/static: missing "or" function call in package.html template Nov 25, 2019
@dmitshur dmitshur removed the Builders label Nov 25, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 25, 2019

Change https://golang.org/cl/208757 mentions this issue: content/static: re-add "or" function call to package.html template

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 25, 2019

Change https://golang.org/cl/208661 mentions this issue: godoc/content: re-add "or" function call to package.html template

gopherbot pushed a commit to golang/tools that referenced this issue Nov 26, 2019
It was removed unintentionally in CL 101295, where the intention was
to remove the (eq $.Dirname "/src") condition.

Updates golang/go#35812

Change-Id: I1591ed221f0d510fb1ffa51a3ecd48d8327fdfbb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208661
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.