mirror of
https://github.com/golang/go
synced 2024-11-18 04:54:49 -07:00
x/tools/cmd/html2article: remove unused functions
Found with honnef.co/go/tools/cmd/unused. Change-Id: Ifd1ed4005eec55cebfd5c0d0519b8af328fcc470 Reviewed-on: https://go-review.googlesource.com/37601 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
8211efe185
commit
fd9cb7c10f
@ -298,17 +298,6 @@ func hasStyle(s Style) selector {
|
||||
}
|
||||
}
|
||||
|
||||
func hasAttr(key, val string) selector {
|
||||
return func(n *html.Node) bool {
|
||||
for _, a := range n.Attr {
|
||||
if a.Key == key && a.Val == val {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func attr(node *html.Node, key string) (value string) {
|
||||
for _, attr := range node.Attr {
|
||||
if attr.Key == key {
|
||||
@ -318,16 +307,6 @@ func attr(node *html.Node, key string) (value string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
func findAll(node *html.Node, fn selector) (nodes []*html.Node) {
|
||||
walk(node, func(n *html.Node) bool {
|
||||
if fn(n) {
|
||||
nodes = append(nodes, n)
|
||||
}
|
||||
return true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func find(n *html.Node, fn selector) *html.Node {
|
||||
var result *html.Node
|
||||
walk(n, func(n *html.Node) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user