mirror of
https://github.com/PuerkitoBio/goquery
synced 2026-04-22 23:37:04 +08:00
remove var declaration
This commit is contained in:
+1
-3
@@ -684,9 +684,7 @@ func getParentNodes(nodes []*html.Node) []*html.Node {
|
||||
// Returns an array of nodes mapped by calling the callback function once for
|
||||
// each node in the source nodes.
|
||||
func mapNodes(nodes []*html.Node, f func(int, *html.Node) []*html.Node) (result []*html.Node) {
|
||||
var set map[*html.Node]bool
|
||||
|
||||
set = make(map[*html.Node]bool)
|
||||
set := make(map[*html.Node]bool)
|
||||
for i, n := range nodes {
|
||||
if vals := f(i, n); len(vals) > 0 {
|
||||
result = appendWithoutDuplicates(result, vals, set)
|
||||
|
||||
Reference in New Issue
Block a user