MCPcopy Create free account
hub / github.com/PuerkitoBio/goquery / First

Method First

array.go:20–22  ·  view source on GitHub ↗

First reduces the set of matched elements to the first in the set. It returns a new Selection object, and an empty Selection object if the the selection is empty.

()

Source from the content-addressed store, hash-verified

18// It returns a new Selection object, and an empty Selection object if the
19// the selection is empty.
20func (s *Selection) First() *Selection {
21 return s.Eq(0)
22}
23
24// Last reduces the set of matched elements to the last in the set.
25// It returns a new Selection object, and an empty Selection object if

Callers 11

TestBeforeHtmlContextFunction · 0.80
TestPrependHtmlContextFunction · 0.80
TestSingleFunction · 0.80
TestText3Function · 0.80
TestFirstFunction · 0.80
TestFirstEmptyFunction · 0.80
TestFirstInvalidFunction · 0.80
TestFirstRollbackFunction · 0.80
BenchmarkFirstFunction · 0.80

Calls 1

EqMethod · 0.95

Tested by 11

TestBeforeHtmlContextFunction · 0.64
TestPrependHtmlContextFunction · 0.64
TestSingleFunction · 0.64
TestText3Function · 0.64
TestFirstFunction · 0.64
TestFirstEmptyFunction · 0.64
TestFirstInvalidFunction · 0.64
TestFirstRollbackFunction · 0.64
BenchmarkFirstFunction · 0.64