aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-10-28 20:46:58 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-10-29 12:20:11 +0000
commit37afd3e31100a06229da61549abf5210a1dae8d0 (patch)
tree9a781b3e897c429c182c73b101c0af4fbd557898 /src/database/sql
parent3f3142ad99155424007b8e8182265b5b716b44ee (diff)
downloadgo-37afd3e31100a06229da61549abf5210a1dae8d0.tar.xz
text/template/parse: simplify Tree.pipeline
The pipeline parsing code was unnecessarily complex. It used a for loop with a trailing break, a complex switch, and up to seven levels of indentation. Instead, drop the loop in favor of a single named goto with a comment, and flatten out the complex switch to be easier to follow. Two lines of code are now duplicated, but they're simple and only three lines apart. While at it, move the pipe initialization further up to remove the need for three variables. Change-Id: I07b29de195f4000336219aadeadeacaaa4285c58 Reviewed-on: https://go-review.googlesource.com/c/145285 Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions