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: documentation: "pipeline" is never defined clearly #13972

bprosnitz opened this issue Jan 15, 2016 · 2 comments

text/template: documentation: "pipeline" is never defined clearly #13972

bprosnitz opened this issue Jan 15, 2016 · 2 comments


Copy link

@bprosnitz bprosnitz commented Jan 15, 2016

Referring to:

In the "action" section it says:

Here is the list of actions. "Arguments" and "pipelines" are evaluations of data, defined in detail below.

and later

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

in the pipeline section it says


A pipeline may be "chained" by separating a sequence of commands with pipeline characters '|'. In a chained pipeline, the result of the each command is passed as the last argument of the following command. The output of the final command in the pipeline is the value of the pipeline.

The output of a command will be either one value or two values, the second of which has type error. If that second value is present and evaluates to non-nil, execution terminates and the error is returned to the caller of Execute.

From this, it sounds like a pipeline is the result of a command but it is not stated clearly. The first sentence of the pipelines section should start off with a definition of what it is.

@ianlancetaylor ianlancetaylor changed the title go template documentation: "pipeline" is never defined clearly text/template: documentation: "pipeline" is never defined clearly Jan 15, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.6Maybe milestone Jan 15, 2016
Copy link

@bradfitz bradfitz commented Jan 15, 2016

I've never been a big template user but on the rare occasions where I do use the package, I immediately re-read the docs and have also been often confused by this.

/cc @robpike @adg

@robpike robpike self-assigned this Jan 17, 2016
Copy link

@gopherbot gopherbot commented Jan 21, 2016

CL mentions this issue.

@gopherbot gopherbot closed this in 754216d Jan 21, 2016
@golang golang locked and limited conversation to collaborators Jan 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.