Commit b15a1e3c authored by Michal Bohuslávek's avatar Michal Bohuslávek Committed by Brad Fitzpatrick
Browse files

text/template: Put bad function name in quotes in panic from (*Template).Funcs

This turns

	panic: function name  is not a valid identifier

into
	panic: function name "" is not a valid identifier

and also makes it consistent with the func signature check.

This CL also makes the testBadFuncName func a test helper.

Change-Id: Id967cb61ac28228de81e1cd76a39f5195a5ebd11
Reviewed-on: https://go-review.googlesource.com/130998


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 4b439e41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment