Commit 27cf81e1 authored by Rob Pike's avatar Rob Pike
Browse files

text/template: further simplify building the vars list

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: default avatarIan Lance Taylor <iant@golang.org>
parent e76b9e89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment