remove var declaration

This commit is contained in:
Martin Angers
2016-08-27 22:44:10 -04:00
parent 6841d28c6f
commit d85ad7e2ed
+1 -3
View File
@@ -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)