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

text/template: cannot find pointer method on addressable nil pointer #18816

Closed
rsc opened this issue Jan 27, 2017 · 1 comment
Closed

text/template: cannot find pointer method on addressable nil pointer #18816

rsc opened this issue Jan 27, 2017 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jan 27, 2017

If you read a *T out of a []*T and it is nil, the template package cannot invoke pointer methods using it, because the template package takes its address, producing a **T with no methods. (For a non-nil *T, it's been indirected to T, so taking the address restores the *T. But if you have a nil *T, it can't be indirected, so the extra address-of hurts.)

Fix pending.

@rsc rsc added this to the Go1.9 milestone Jan 27, 2017
@rsc rsc self-assigned this Jan 27, 2017
@gopherbot
Copy link

CL https://golang.org/cl/36542 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 9, 2018
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants