We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
https://play.golang.org/p/Mx5m92IqPl
Note that the error is on line 4, but is reported on line 3. If you remove the - from the template, the correct error message is reported.
go version go1.9 darwin/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/finchnat" GORACE="" GOROOT="/Users/finchnat/src/github.com/golang/go" GOTOOLDIR="/Users/finchnat/src/github.com/golang/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ch/4d1vgsv17jq0b3yfmnkl9thdk0jm7d/T/go-build584589423=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOROOT/bin/go version: go version go1.9 darwin/amd64 GOROOT/bin/go tool compile -V: compile version go1.9 uname -v: Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G29 lldb --version: lldb-370.0.42 Swift-3.1
The text was updated successfully, but these errors were encountered:
I'll take a stab at this; thanks for the reproducer.
Sorry, something went wrong.
CL sent; this is a regression introduced with whitespace trimming last year.
Change https://golang.org/cl/61870 mentions this issue: text/template: fix pos info when trimming newlines
text/template: fix pos info when trimming newlines
9b8964b
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What did you do?
https://play.golang.org/p/Mx5m92IqPl
Note that the error is on line 4, but is reported on line 3. If you remove the - from the template, the correct error message is reported.
System details
The text was updated successfully, but these errors were encountered: