1
0
mirror of https://github.com/golang/go synced 2024-11-21 15:44:44 -07:00

misc: fix a couple of template uses preparatory to the big switch.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4876057
This commit is contained in:
Rob Pike 2011-08-17 13:57:06 +10:00
parent 1d8f822c17
commit ff0240da6d
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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' }