mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2024-04-21 12:31:36 +00:00
Updated docs for First() and Last()
This commit is contained in:
@@ -5,13 +5,15 @@ import (
|
||||
)
|
||||
|
||||
// First() reduces the set of matched elements to the first in the set.
|
||||
// It returns a new Selection object.
|
||||
// It returns a new Selection object, and an empty Selection object if the
|
||||
// the selection is empty.
|
||||
func (this *Selection) First() *Selection {
|
||||
return this.Eq(0)
|
||||
}
|
||||
|
||||
// Last() reduces the set of matched elements to the last in the set.
|
||||
// It returns a new Selection object.
|
||||
// It returns a new Selection object, and an empty Selection object if
|
||||
// the selection is empty.
|
||||
func (this *Selection) Last() *Selection {
|
||||
return this.Eq(-1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user