diff options
| author | Daniel Theophanes <kardianos@gmail.com> | 2018-06-21 10:41:26 -0700 |
|---|---|---|
| committer | Daniel Theophanes <kardianos@gmail.com> | 2018-06-22 08:05:11 +0000 |
| commit | bedfa4e1c37bd08063865da628f242d27ca06ec4 (patch) | |
| tree | 24be31b8f4cecfcfc67c5e245c1210c521643465 /src/text/template/parse/parse.go | |
| parent | 4991bc6257a9e9d922f7b6e29e393d764c4e4295 (diff) | |
| download | go-bedfa4e1c37bd08063865da628f242d27ca06ec4.tar.xz | |
text/template/parse: undo breaking API changes
golang.org/cl/84480 altered the API for the parse package for
clarity and consistency. However, the changes also broke the
API for consumers of the package. This CL reverts the API
to the previous spelling, adding only a single new exported
symbol.
Fixes #25968
Change-Id: Ieb81054b61eeac7df3bc3864ef446df43c26b80f
Reviewed-on: https://go-review.googlesource.com/120355
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Daniel Martà <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/text/template/parse/parse.go')
| -rw-r--r-- | src/text/template/parse/parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/text/template/parse/parse.go b/src/text/template/parse/parse.go index 34dc41c620..cb9b44e9da 100644 --- a/src/text/template/parse/parse.go +++ b/src/text/template/parse/parse.go @@ -384,7 +384,7 @@ func (t *Tree) action() (n Node) { // declarations? command ('|' command)* func (t *Tree) pipeline(context string) (pipe *PipeNode) { decl := false - var vars []*AssignNode + var vars []*VariableNode token := t.peekNonSpace() pos := token.pos // Are there declarations or assignments? @@ -422,7 +422,7 @@ func (t *Tree) pipeline(context string) (pipe *PipeNode) { break } pipe = t.newPipeline(pos, token.line, vars) - pipe.Decl = decl + pipe.IsAssign = !decl for { switch token := t.nextNonSpace(); token.typ { case itemRightDelim, itemRightParen: |
