mirror of
https://github.com/PuerkitoBio/goquery
synced 2025-10-15 21:30:37 +08:00
fix comment in Slice(), negative indices are now supported
This commit is contained in:
2
array.go
2
array.go
@@ -28,7 +28,7 @@ func (this *Selection) Eq(index int) *Selection {
|
||||
}
|
||||
|
||||
// Slice() reduces the set of matched elements to a subset specified by a range
|
||||
// of indices. At the moment, negative indices are not supported.
|
||||
// of indices.
|
||||
func (this *Selection) Slice(start int, end int) *Selection {
|
||||
if start < 0 {
|
||||
start += len(this.Nodes)
|
||||
|
Reference in New Issue
Block a user