From ff0240da6db6bd7cb5f87b3b8bde965cf5dd22d5 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 17 Aug 2011 13:57:06 +1000 Subject: [PATCH] misc: fix a couple of template uses preparatory to the big switch. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4876057 --- doc/tmpltohtml.go | 2 +- src/pkg/go/doc/comment.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tmpltohtml.go b/doc/tmpltohtml.go index 0a509d90b82..f4d2e2c2c44 100644 --- a/doc/tmpltohtml.go +++ b/doc/tmpltohtml.go @@ -46,7 +46,7 @@ func main() { // Read and parse the input. name := flag.Args()[0] tmpl := template.New(name).Funcs(template.FuncMap{"code": code}) - if err := tmpl.ParseFile(name); err != nil { + if _, err := tmpl.ParseFile(name); err != nil { log.Fatal(err) } diff --git a/src/pkg/go/doc/comment.go b/src/pkg/go/doc/comment.go index 2a24b14556f..af307459ece 100644 --- a/src/pkg/go/doc/comment.go +++ b/src/pkg/go/doc/comment.go @@ -11,7 +11,7 @@ import ( "io" "regexp" "strings" - "template" // for htmlEscape + "exp/template" // for HTMLEscape ) func isWhitespace(ch byte) bool { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' }