diff options
Diffstat (limited to 'libgo/go/text/template/funcs.go')
-rw-r--r-- | libgo/go/text/template/funcs.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libgo/go/text/template/funcs.go b/libgo/go/text/template/funcs.go index 49e9e7419a4..cd0b82b243d 100644 --- a/libgo/go/text/template/funcs.go +++ b/libgo/go/text/template/funcs.go @@ -142,7 +142,7 @@ func prepareArg(value reflect.Value, argType reflect.Type) (reflect.Value, error // Indexing. // index returns the result of indexing its first argument by the following -// arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each +// arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each // indexed item must be a map, slice, or array. func index(item interface{}, indices ...interface{}) (interface{}, error) { v := reflect.ValueOf(item) @@ -322,7 +322,6 @@ const ( complexKind intKind floatKind - integerKind stringKind uintKind ) @@ -515,7 +514,7 @@ func HTMLEscape(w io.Writer, b []byte) { // HTMLEscapeString returns the escaped HTML equivalent of the plain text data s. func HTMLEscapeString(s string) string { // Avoid allocation if we can. - if strings.IndexAny(s, `'"&<>`) < 0 { + if !strings.ContainsAny(s, `'"&<>`) { return s } var b bytes.Buffer |