<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/text/template/parse/node.go, branch fix-runtime-test-GOMAXPROCS</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2024-06-21T18:12:29Z</updated>
<entry>
<title>text/template/parse: fix handling of assignment/declaration in PipeNode.String</title>
<updated>2024-06-21T18:12:29Z</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2024-06-13T23:48:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6fea4094242fe4e7be8bd7ec0b55df9f6df3f025'/>
<id>urn:sha1:6fea4094242fe4e7be8bd7ec0b55df9f6df3f025</id>
<content type='text'>
The String method for Pipes assumed all variables were declared. Easy fix:
check the IsAssign bit.

Fixes #65382

Change-Id: I58f2760c1a8bb2821c3538645d893f58fd76ae73
Reviewed-on: https://go-review.googlesource.com/c/go/+/592695
Run-TryBot: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Rob Pike &lt;r@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>text: add available godoc link</title>
<updated>2024-02-26T20:57:51Z</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2023-11-04T08:14:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=601eb78de263023fc068c978858e2774faa915c0'/>
<id>urn:sha1:601eb78de263023fc068c978858e2774faa915c0</id>
<content type='text'>
Change-Id: Idbc110cfc4fd6bbbc8b79807ac14abf7b30e0e65
Reviewed-on: https://go-review.googlesource.com/c/go/+/539855
Run-TryBot: shuang cui &lt;imcusg@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: qiulaidongfeng &lt;2645477756@qq.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>all: remove newline characters after return statements</title>
<updated>2023-12-14T17:22:18Z</updated>
<author>
<name>Danil Timerbulatov</name>
<email>timerbulatov.danila@gmail.com</email>
</author>
<published>2023-12-07T21:17:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=527829a7cba4ded29f98fae97f8bab9de247d5fe'/>
<id>urn:sha1:527829a7cba4ded29f98fae97f8bab9de247d5fe</id>
<content type='text'>
This commit is aimed at improving the readability and consistency
of the code base. Extraneous newline characters were present after
some return statements, creating unnecessary separation in the code.

Fixes #64610

Change-Id: Ic1b05bf11761c4dff22691c2f1c3755f66d341f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/548316
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>html/template, text/template: implement break and continue for range loops</title>
<updated>2021-09-23T02:52:10Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-05-20T16:46:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d0dd26a88c019d54f22463daae81e785f5867565'/>
<id>urn:sha1:d0dd26a88c019d54f22463daae81e785f5867565</id>
<content type='text'>
Break and continue for range loops was accepted as a proposal in June 2017.
It was implemented in CL 66410 (Oct 2017)
but then rolled back in CL 92155 (Feb 2018)
because html/template changes had not been implemented.

This CL reimplements break and continue in text/template
and then adds support for them in html/template as well.

Fixes #20531.

Change-Id: I05330482a976f1c078b4b49c2287bd9031bb7616
Reviewed-on: https://go-review.googlesource.com/c/go/+/321491
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template: add CommentNode to template parse tree</title>
<updated>2020-08-28T21:45:12Z</updated>
<author>
<name>Ariel Mashraki</name>
<email>ariel@mashraki.co.il</email>
</author>
<published>2020-04-22T19:17:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c8ea03828b0645b1fd5725888e44873b75fcfbb6'/>
<id>urn:sha1:c8ea03828b0645b1fd5725888e44873b75fcfbb6</id>
<content type='text'>
Fixes #34652

Change-Id: Icf6e3eda593fed826736f34f95a9d66f5450cc98
Reviewed-on: https://go-review.googlesource.com/c/go/+/229398
Reviewed-by: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template: fix lint typo in VariableNode doc</title>
<updated>2020-06-23T00:10:24Z</updated>
<author>
<name>Macks</name>
<email>macksme@outlook.com</email>
</author>
<published>2020-06-23T00:09:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=968e18eebd736870a1e3bf06d941dc06e7b20688'/>
<id>urn:sha1:968e18eebd736870a1e3bf06d941dc06e7b20688</id>
<content type='text'>
Change-Id: I68b8c782478aa3e7adbd36a2de1c20b04e8c395b
GitHub-Last-Rev: 50f27197837e57e1d68b8905eaa66ea142bd45fc
GitHub-Pull-Request: golang/go#39622
Reviewed-on: https://go-review.googlesource.com/c/go/+/239383
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template/parse: speed up nodes printing</title>
<updated>2019-10-03T00:16:28Z</updated>
<author>
<name>Ariel Mashraki</name>
<email>ariel@mashraki.co.il</email>
</author>
<published>2019-10-01T19:40:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=debbb1e78d08b201313c83f2d236de90d8444c8e'/>
<id>urn:sha1:debbb1e78d08b201313c83f2d236de90d8444c8e</id>
<content type='text'>
This CL is a follow up for 198080.
Added a private writeTo method to the Node interface,
in order to use the same builder for printing all nodes
in the tree. Benchmark output against master:

benchmark                     old ns/op     new ns/op     delta
BenchmarkParseLarge-8         24594994      25292054      +2.83%
BenchmarkVariableString-8     117           118           +0.85%
BenchmarkListString-8         10475         3353          -67.99%

benchmark                     old allocs     new allocs     delta
BenchmarkVariableString-8     3              3              +0.00%
BenchmarkListString-8         149            31             -79.19%

benchmark                     old bytes     new bytes     delta
BenchmarkVariableString-8     72            72            +0.00%
BenchmarkListString-8         5698          1608          -71.78%

Change-Id: I2b1cf07cda65c1b80083fb99671289423700feba
Reviewed-on: https://go-review.googlesource.com/c/go/+/198278
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Run-TryBot: Rob Pike &lt;r@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template/parse: use strings.Builder in Chain and List nodes</title>
<updated>2019-10-01T19:03:51Z</updated>
<author>
<name>Ariel Mashraki</name>
<email>ariel@mashraki.co.il</email>
</author>
<published>2019-10-01T15:39:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=86cd6c2ee5c5e4c5b5edf4ea8d1c85f80d9706a8'/>
<id>urn:sha1:86cd6c2ee5c5e4c5b5edf4ea8d1c85f80d9706a8</id>
<content type='text'>
This CL is a continuation of 198078. Benchmark output:

benchmark                     old ns/op     new ns/op     delta
BenchmarkParseLarge-8         24759165      24516563      -0.98%
BenchmarkVariableString-8     115           115           +0.00%
BenchmarkListString-8         924           680           -26.41%

benchmark                     old allocs     new allocs     delta
BenchmarkVariableString-8     3              3              +0.00%
BenchmarkListString-8         14             13             -7.14%

benchmark                     old bytes     new bytes     delta
BenchmarkVariableString-8     72            72            +0.00%
BenchmarkListString-8         512           424           -17.19%

Change-Id: I9ec48fe4832437c556a5fa94d4cbf6e29e28d944
Reviewed-on: https://go-review.googlesource.com/c/go/+/198080
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template/parse: use strings.Builder in String methods</title>
<updated>2019-10-01T07:16:47Z</updated>
<author>
<name>Ariel Mashraki</name>
<email>ariel@mashraki.co.il</email>
</author>
<published>2019-09-30T22:10:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4f13a9c5b1bfc9ec2213d9ee7d9df49661b119dd'/>
<id>urn:sha1:4f13a9c5b1bfc9ec2213d9ee7d9df49661b119dd</id>
<content type='text'>
As mentioned in godoc, strings.Builder is more efficient for
concatenating and building strings.
Running a simple bench test on VariableNode.String() gives:

benchmark                     old ns/op     new ns/op     delta
BenchmarkParseLarge-8         25676831      24453285      -4.77%
BenchmarkVariableString-8     296           115           -61.15%

benchmark                     old allocs     new allocs     delta
BenchmarkVariableString-8     8              3              -62.50%

benchmark                     old bytes     new bytes     delta
BenchmarkVariableString-8     112           72            -35.71%

Change-Id: I13c9340080738fcad1edeed859d33ba608e4b05a
Reviewed-on: https://go-review.googlesource.com/c/go/+/198078
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>text/template: further simplify building the vars list</title>
<updated>2019-10-01T00:00:02Z</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2019-09-30T23:54:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=27cf81e1b48efe6a6387f34c7114766c7b0d4d73'/>
<id>urn:sha1:27cf81e1b48efe6a6387f34c7114766c7b0d4d73</id>
<content type='text'>
Followup to https://golang.org/cl/197997

If you know the number of elements, you don't need append at all.
Either use append to grow, or allocate and index. Here we choose
number 2.

Change-Id: Ic58637231789640ff7b293ece04a95a8de7ccf8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/198097
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
</feed>
