Skip to content

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

@rsc

Description

@rsc

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions