]> Cypherpunks repositories - gostls13.git/commitdiff
html/template: remove unused func
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 19 Feb 2018 19:18:25 +0000 (19:18 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 19 Feb 2018 20:58:45 +0000 (20:58 +0000)
Noticed while reading some code.

Change-Id: I63f8c7a453d4895583a8ffc13bec57385b6944aa
Reviewed-on: https://go-review.googlesource.com/95195
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/html/template/escape.go

index 5963194be6fe326ad4824b6679d7c247540a0b56..c77b23ae687829bb2b3d92058d4e60de92fef8b9 100644 (file)
@@ -380,16 +380,6 @@ func appendCmd(cmds []*parse.CommandNode, cmd *parse.CommandNode) []*parse.Comma
        return append(cmds, cmd)
 }
 
-// indexOfStr is the first i such that eq(s, strs[i]) or -1 if s was not found.
-func indexOfStr(s string, strs []string, eq func(a, b string) bool) int {
-       for i, t := range strs {
-               if eq(s, t) {
-                       return i
-               }
-       }
-       return -1
-}
-
 // newIdentCmd produces a command containing a single identifier node.
 func newIdentCmd(identifier string, pos parse.Pos) *parse.CommandNode {
        return &parse.CommandNode{