From: Rob Pike Date: Wed, 17 Aug 2011 03:57:06 +0000 (+1000) Subject: misc: fix a couple of template uses preparatory to the big switch. X-Git-Tag: weekly.2011-08-17~23 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ff0240da6db6bd7cb5f87b3b8bde965cf5dd22d5;p=gostls13.git misc: fix a couple of template uses preparatory to the big switch. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4876057 --- diff --git a/doc/tmpltohtml.go b/doc/tmpltohtml.go index 0a509d90b8..f4d2e2c2c4 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 2a24b14556..af307459ec 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' }