From bedfa4e1c37bd08063865da628f242d27ca06ec4 Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Thu, 21 Jun 2018 10:41:26 -0700 Subject: text/template/parse: undo breaking API changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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í Reviewed-by: Rob Pike Run-TryBot: Daniel Martí TryBot-Result: Gobot Gobot --- src/text/template/parse/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/text/template/parse/parse.go') 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: -- cgit v1.3