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

text/template: improve documentation for creating templates #4338

Closed
gopherbot opened this issue Nov 3, 2012 · 13 comments
Closed

text/template: improve documentation for creating templates #4338

gopherbot opened this issue Nov 3, 2012 · 13 comments
Labels
Documentation FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@gopherbot
Copy link

by Shifter1:

http://play.golang.org/p/YfvMjcI7b5


Errors from that code are unhelpful, and the documentation for 
* http://golang.org/pkg/text/template/#New
* http://golang.org/pkg/text/template/#Template.ParseFiles


No mention is made in the docs that when using .New() and then .ParseFiles(), the
orginal temaplte's name needs to tbe the same as the base name of the first file.
@robpike
Copy link
Contributor

robpike commented Nov 4, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 2:

Labels changed: added size-l.

@robpike
Copy link
Contributor

robpike commented Mar 12, 2013

Comment 3:

Owner changed to @adg.

@adg
Copy link
Contributor

adg commented Apr 3, 2013

Comment 4:

Labels changed: removed go1.1.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 5:

Labels changed: added go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Sep 10, 2013

Comment 6:

Labels changed: added documentation.

@rsc
Copy link
Contributor

rsc commented Nov 25, 2013

Comment 7:

Labels changed: added go1.3, removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 8:

Labels changed: added release-go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 10:

Labels changed: added repo-main.

@rsc
Copy link
Contributor

rsc commented May 9, 2014

Comment 11:

Labels changed: added release-none, suggested, removed release-go1.3.

@gopherbot gopherbot added accepted Documentation Suggested Issues that may be good for new contributors looking for work to do. labels May 9, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@odeke-em
Copy link
Member

Perhaps this issue was fixed by f2662f2 ie CL https://go-review.googlesource.com/#/c/11329?

In particular the documentation after that CL says
screen shot 2016-07-10 at 2 35 38 am

The example provided in the issue is incomplete/unrunnable even locally, but I wonder if was meant for html/template instead since that's what referred to there. Although, html/template documentation says the same thing
screen shot 2016-07-10 at 2 46 27 am

@adg
Copy link
Contributor

adg commented Jul 11, 2016

Thanks for finding this @odeke-em. I think we can close it.

@adg adg closed this as completed Jul 11, 2016
@golang golang locked and limited conversation to collaborators Jul 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants