MCPcopy
hub / github.com/PuerkitoBio/goquery / isInSlice

Function isInSlice

utilities.go:110–112  ·  view source on GitHub ↗

Checks if the target node is in the slice of nodes.

(slice []*html.Node, node *html.Node)

Source from the content-addressed store, hash-verified

108
109// Checks if the target node is in the slice of nodes.
110func isInSlice(slice []*html.Node, node *html.Node) bool {
111 return indexInSlice(slice, node) > -1
112}
113
114// Returns the index of the target node in the slice, or -1.
115func indexInSlice(slice []*html.Node, node *html.Node) int {

Callers 2

winnowNodesFunction · 0.85
appendWithoutDuplicatesFunction · 0.85

Calls 1

indexInSliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…