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: does not document how values are formatted #16105

Closed
rogpeppe opened this issue Jun 18, 2016 · 2 comments
Closed

text/template: does not document how values are formatted #16105

rogpeppe opened this issue Jun 18, 2016 · 2 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rogpeppe
Copy link
Contributor

go version devel +3c6b668 Thu Jun 2 00:22:03 2016 +0000 linux/amd64

I may well have missed it, but text/template package doesn't seem to specify
anywhere how values are actually displayed. For example, by reading the
documentation, it's not clear whether a value's String method will be called
to produce text to display in the template.

@cespare
Copy link
Contributor

cespare commented Jun 18, 2016

I agree; the closest thing in the documentation currently is

The default textual representation of the value of the pipeline is copied to the output.

The "default" it refers to is (AFAICT) the same "default format" that the fmt package documentation refers to. Perhaps the fix is simply to say that values are formatted as if using the %v verb.

/cc @robpike @adg

@adg adg added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 20, 2016
@adg adg added this to the Go1.7Maybe milestone Jun 20, 2016
@adg adg self-assigned this Jun 20, 2016
@gopherbot
Copy link

CL https://golang.org/cl/24281 mentions this issue.

@golang golang locked and limited conversation to collaborators Jun 21, 2017
@rsc rsc unassigned adg Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants