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

html/template: how about add a new fucntion #9840

Closed
TapirLiu opened this issue Feb 11, 2015 · 1 comment
Closed

html/template: how about add a new fucntion #9840

TapirLiu opened this issue Feb 11, 2015 · 1 comment

Comments

@TapirLiu
Copy link
Contributor

func (t *Template) Execute(wr io.Writer, data interface{}, funcMap FuncMap) error

for the calling

aTempalte.Funcs (customFuncs).Execute (wr, data)

will not be executed safely in parallel.

@TapirLiu
Copy link
Contributor Author

sorry, don't know go template is so powerful that it can call a method of data field.
http://stackoverflow.com/questions/10200178/call-a-method-from-a-go-template

@mikioh mikioh changed the title [feature request] how about add a new fucntion to html/template html/template: how about add a new fucntion Feb 15, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
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