mirror of
https://github.com/golang/go
synced 2024-11-21 22:04:39 -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:
parent
1d8f822c17
commit
ff0240da6d
@ -46,7 +46,7 @@ func main() {
|
|||||||
// Read and parse the input.
|
// Read and parse the input.
|
||||||
name := flag.Args()[0]
|
name := flag.Args()[0]
|
||||||
tmpl := template.New(name).Funcs(template.FuncMap{"code": code})
|
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)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"template" // for htmlEscape
|
"exp/template" // for HTMLEscape
|
||||||
)
|
)
|
||||||
|
|
||||||
func isWhitespace(ch byte) bool { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' }
|
func isWhitespace(ch byte) bool { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' }
|
||||||
|
Loading…
Reference in New Issue
Block a user