-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
What did you do?
Execute a template like {{ (1) 2 }} with text/template and html/template. Full example on Go Playground: https://play.golang.org/p/nDdB_6tzx8G
What did you expect to see?
I'd expect {{ 1 2 }} and {{ (1) 2 }} to behave the same.The last item at https://golang.org/pkg/text/template/#hdr-Arguments reads like parenthesizing a single argument should have no effect.
What did you see instead?
{{ 1 2 }} yields an error (as I'd expect) but {{ (1) 2 }} outputs 1 without an error.
System details
go version go1.12.4 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/julian/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/julian/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version go1.12.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.12.4
uname -sr: Linux 5.0.9-arch1-1-ARCH
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.29.
gdb --version: GNU gdb (GDB) 8.2.1
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.