]> Cypherpunks repositories - gostls13.git/commit
text/template: remove duplicate logic in conditional
authorSeth Vargo <sethvargo@gmail.com>
Thu, 19 Jan 2017 18:19:22 +0000 (13:19 -0500)
committerIan Lance Taylor <iant@golang.org>
Tue, 7 Feb 2017 15:10:25 +0000 (15:10 +0000)
commit50c7783f599d3af0e65f1c301c7ff05f6876def7
tree09152641e3186ded0ac3cbb4736c5b931d3ab4d8
parentbed8129ee69f5b2d32cd84e4cc0e3e3be50366dc
text/template: remove duplicate logic in conditional

It looks like this conditional may have been refactored at some point,
but the logic was still very confusing. The outer conditional checks if
the function is variadic, so there's no need to verify that in the
result. Additionally, since the function isn't variadic, there is no
reason to permit the function call if the number of input arguments is
less than the function signature requires.

Change-Id: Ia957cf83d1c900c08dd66384efcb74f0c368422e
Reviewed-on: https://go-review.googlesource.com/35491
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/text/template/exec.go