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

Simple methods should be allowed as data sources for templates #389

Closed
hoisie opened this issue Dec 7, 2009 · 2 comments
Closed

Simple methods should be allowed as data sources for templates #389

hoisie opened this issue Dec 7, 2009 · 2 comments

Comments

@hoisie
Copy link
Contributor

hoisie commented Dec 7, 2009

(adding it as an issue in case I forget)

It would be awesome if the following was allowed:
http://pastie.org/731191

What is the expected output? What do you see instead?
I would like to see:
John Doe
John Doe

Right now I only see:
John Doe

What is your $GOOS?  $GOARCH?
linux/386

Which revision are you using?  (hg identify)
7620e54a1ccf+ tip

Please provide any additional information below.
The template package is quite constraining because you have to construct 
all the data before executing the template. You could have a lot more 
flexibility if no-arg methods were allowed.
@robpike
Copy link
Contributor

robpike commented Dec 9, 2009

Comment 1:

Labels changed: added packagechange.

Owner changed to r...@golang.org.

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Dec 16, 2009

Comment 2:

This issue was closed by revision 42a2e95.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned robpike Jun 22, 2022
This issue was closed.
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

3 participants