mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2024-04-21 12:31:36 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a28d5edf42 | ||
|
|
7f5775caed | ||
|
|
b26e04175c |
@@ -8,7 +8,11 @@ Syntax-wise, it is as close as possible to jQuery, with the same function names
|
||||
|
||||
## Installation
|
||||
|
||||
Since this library (and cascadia) depends on the experimental branch, this package must be installed first. Both GoQuery and Cascadia expect to find the experimental library with the `"exp/html"` import statement. To install it at this location, please [follow this guide][wikiexp].
|
||||
Since this library (and cascadia) depends on the experimental branch, this package must be installed first. Both GoQuery and Cascadia expect to find the experimental library with the `"exp/html"` import statement. To install it at this location, there's [this guide][wikiexp], but since late December 2012, Go tip has evolved and `"exp/html"` won't build with Go1.0.3. So the last valid revision that will build with Go1 is `d9ff34d481bc`. Just replace the second step in [the guide][wikiexp] with this command:
|
||||
|
||||
hg clone -r d9ff34d481bc https://code.google.com/p/go go-exp
|
||||
|
||||
The rest of the guide can be followed as-is (note that you can build just the `exp/html` package, you don't have to build `exp/...`).
|
||||
|
||||
Once this is done, install GoQuery:
|
||||
|
||||
@@ -104,5 +108,5 @@ The [BSD 3-Clause license][bsd], the same as the [Go language][golic]. Cascadia'
|
||||
[bsd]: http://opensource.org/licenses/BSD-3-Clause
|
||||
[golic]: http://golang.org/LICENSE
|
||||
[caslic]: http://code.google.com/p/cascadia/source/browse/LICENSE
|
||||
[doc]: http://go.pkgdoc.org/github.com/puerkitobio/goquery
|
||||
[doc]: http://go.pkgdoc.org/github.com/PuerkitoBio/goquery
|
||||
[index]: http://api.jquery.com/index/
|
||||
|
||||
@@ -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