summaryrefslogtreecommitdiff
path: root/src/text
diff options
context:
space:
mode:
authorAlexandre Maari <draeron@gmail.com>2018-10-15 13:23:09 -0400
committerRob Pike <r@golang.org>2018-10-23 00:28:36 +0000
commit0cc4c2971da80d010af5a3336ad2e7fda06f06a8 (patch)
tree0f26eb1b3fa5f8d2ec6b1d14a0b1f6a53efe59ac /src/text
parentcc558fedfbe71222c85ba0ed24dcf873f934bbdb (diff)
downloadgo-git-0cc4c2971da80d010af5a3336ad2e7fda06f06a8.tar.gz
text/template: removed truncation of context in error message
Fixes #27930 Change-Id: I31ad3fdb74d74152268c59ae4c651cc4c8c1716d Reviewed-on: https://go-review.googlesource.com/c/142217 Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/text')
-rw-r--r--src/text/template/parse/parse.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/text/template/parse/parse.go b/src/text/template/parse/parse.go
index cb9b44e9da..efdad3297c 100644
--- a/src/text/template/parse/parse.go
+++ b/src/text/template/parse/parse.go
@@ -148,9 +148,6 @@ func (t *Tree) ErrorContext(n Node) (location, context string) {
}
lineNum := 1 + strings.Count(text, "\n")
context = n.String()
- if len(context) > 20 {
- context = fmt.Sprintf("%.20s...", context)
- }
return fmt.Sprintf("%s:%d:%d", tree.ParseName, lineNum, byteNum), context
}