Skip to content

text/template: handle indirection of nil better #7333

@robpike

Description

@robpike
http://play.golang.org/p/uP6pCW3qKT

The crash in the last of the sequences in this program is necessary (we indirect through
a nil pointer while attempting to find  value with which to call a function), but the
error presentation is not helpful to the user.

It would be nice to catch this somehow, at least to show context about where the error
occurred in the template.

Maybe an easy fix. Marking for 1.3Maybe in case that's true. The bare panic here is very
unfortunate.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions