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

Method Last

array.go:27–29  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

25// It returns a new Selection object, and an empty Selection object if
26// the selection is empty.
27func (s *Selection) Last() *Selection {
28 return s.Eq(-1)
29}
30
31// Eq reduces the set of matched elements to the one at the specified index.
32// If a negative index is given, it counts backwards starting at the end of the

Callers 10

TestAfterHtmlContextFunction · 0.80
TestAppendHtmlContextFunction · 0.80
TestAndSelfFunction · 0.80
TestAddBackFunction · 0.80
TestLastFunction · 0.80
TestLastEmptyFunction · 0.80
TestLastInvalidFunction · 0.80
TestLastRollbackFunction · 0.80
BenchmarkLastFunction · 0.80

Calls 1

EqMethod · 0.95

Tested by 10

TestAfterHtmlContextFunction · 0.64
TestAppendHtmlContextFunction · 0.64
TestAndSelfFunction · 0.64
TestAddBackFunction · 0.64
TestLastFunction · 0.64
TestLastEmptyFunction · 0.64
TestLastInvalidFunction · 0.64
TestLastRollbackFunction · 0.64
BenchmarkLastFunction · 0.64