Browse Source

Re-format project as a Go module (#310)

* Define project as a Go module and update dependency versions

Signed-off-by: Nikos Filippakis <me@nfil.dev>

* Update docs, configs and dockerfile to use latest Go version

Signed-off-by: Nikos Filippakis <me@nfil.dev>

* Add postgres database driver

Signed-off-by: Nikos Filippakis <me@nfil.dev>
pull/318/head
Nikos Filippakis 5 years ago
committed by GitHub
parent
commit
1e297c50ad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .gitignore
  2. 7
      .travis.yml
  3. 10
      Dockerfile
  4. 17
      README.md
  5. 0
      api/api.go
  6. 2
      api/handlers/auth.go
  7. 0
      api/handlers/client.go
  8. 0
      api/handlers/heartbeat.go
  9. 2
      api/handlers/service.go
  10. 2
      api/handlers/webhook.go
  11. 6
      clients/clients.go
  12. 0
      clients/clients_test.go
  13. 0
      database/db.go
  14. 0
      database/interface.go
  15. 0
      database/schema.go
  16. 56
      go.mod
  17. 191
      go.sum
  18. 7
      goneb.go
  19. 0
      goneb_services_test.go
  20. 10
      hooks/pre-commit
  21. 2
      matrix/matrix.go
  22. 0
      metrics/metrics.go
  23. 2
      polling/polling.go
  24. 2
      realms/github/github.go
  25. 2
      realms/jira/jira.go
  26. 0
      realms/jira/urls/urls.go
  27. 0
      realms/jira/urls/urls_test.go
  28. 2
      services/alertmanager/alertmanager.go
  29. 2
      services/alertmanager/alertmanager_test.go
  30. 0
      services/echo/echo.go
  31. 2
      services/giphy/giphy.go
  32. 0
      services/github/client/client.go
  33. 4
      services/github/github.go
  34. 2
      services/github/github_webhook.go
  35. 0
      services/github/github_webhook_test.go
  36. 2
      services/github/webhook/webhook.go
  37. 0
      services/github/webhook/webhook_test.go
  38. 2
      services/google/google.go
  39. 0
      services/google/google_test.go
  40. 2
      services/guggy/guggy.go
  41. 4
      services/guggy/guggy_test.go
  42. 2
      services/imgur/imgur.go
  43. 0
      services/imgur/imgur_test.go
  44. 4
      services/jira/jira.go
  45. 2
      services/jira/webhook/webhook.go
  46. 2
      services/rssbot/rssbot.go
  47. 0
      services/rssbot/rssbot_test.go
  48. 2
      services/slackapi/message.go
  49. 2
      services/slackapi/slackapi.go
  50. 2
      services/travisci/travisci.go
  51. 0
      services/travisci/travisci_test.go
  52. 0
      services/travisci/verify.go
  53. 2
      services/wikipedia/wikipedia.go
  54. 0
      services/wikipedia/wikipedia_test.go
  55. 0
      testutil_test.go
  56. 0
      testutils/testutils.go
  57. 0
      types/actions.go
  58. 0
      types/auth.go
  59. 0
      types/service.go
  60. 347
      vendor/manifest
  61. 12
      vendor/src/github.com/PuerkitoBio/goquery/LICENSE
  62. 122
      vendor/src/github.com/PuerkitoBio/goquery/README.md
  63. 103
      vendor/src/github.com/PuerkitoBio/goquery/array.go
  64. 212
      vendor/src/github.com/PuerkitoBio/goquery/array_test.go
  65. 436
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.0
  66. 438
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.1
  67. 405
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.1-v0.2.1-go1.1rc1.svg
  68. 459
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.0
  69. 420
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.0-v0.2.1-go1.1rc1.svg
  70. 470
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.1-go1.1rc1
  71. 476
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.0
  72. 478
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2
  73. 477
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2-take2
  74. 477
      vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2rc1
  75. 85
      vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.0-go1.7
  76. 85
      vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1a-go1.7
  77. 85
      vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1b-go1.7
  78. 86
      vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1c-go1.7
  79. 120
      vendor/src/github.com/PuerkitoBio/goquery/bench_array_test.go
  80. 40
      vendor/src/github.com/PuerkitoBio/goquery/bench_example_test.go
  81. 104
      vendor/src/github.com/PuerkitoBio/goquery/bench_expand_test.go
  82. 236
      vendor/src/github.com/PuerkitoBio/goquery/bench_filter_test.go
  83. 68
      vendor/src/github.com/PuerkitoBio/goquery/bench_iteration_test.go
  84. 51
      vendor/src/github.com/PuerkitoBio/goquery/bench_property_test.go
  85. 111
      vendor/src/github.com/PuerkitoBio/goquery/bench_query_test.go
  86. 802
      vendor/src/github.com/PuerkitoBio/goquery/bench_traversal_test.go
  87. 123
      vendor/src/github.com/PuerkitoBio/goquery/doc.go
  88. 68
      vendor/src/github.com/PuerkitoBio/goquery/doc/tips.md
  89. 30
      vendor/src/github.com/PuerkitoBio/goquery/example_test.go
  90. 46
      vendor/src/github.com/PuerkitoBio/goquery/expand.go
  91. 96
      vendor/src/github.com/PuerkitoBio/goquery/expand_test.go
  92. 163
      vendor/src/github.com/PuerkitoBio/goquery/filter.go
  93. 206
      vendor/src/github.com/PuerkitoBio/goquery/filter_test.go
  94. 39
      vendor/src/github.com/PuerkitoBio/goquery/iteration.go
  95. 88
      vendor/src/github.com/PuerkitoBio/goquery/iteration_test.go
  96. 550
      vendor/src/github.com/PuerkitoBio/goquery/manipulation.go
  97. 453
      vendor/src/github.com/PuerkitoBio/goquery/manipulation_test.go
  98. 52
      vendor/src/github.com/PuerkitoBio/goquery/misc/git/pre-commit
  99. 278
      vendor/src/github.com/PuerkitoBio/goquery/property.go
  100. 252
      vendor/src/github.com/PuerkitoBio/goquery/property_test.go

5
.gitignore

@ -7,9 +7,10 @@ go-neb.db
*.a
*.so
# Binary file
go-neb
# Folders
bin
pkg
_obj
_test
.idea

7
.travis.yml

@ -1,12 +1,11 @@
language: go
go:
- 1.11
- 1.14
install:
- go get github.com/constabulary/gb/...
- go get github.com/golang/lint/golint
- go get golang.org/x/lint/golint
- go get github.com/fzipp/gocyclo
script: gb build github.com/matrix-org/go-neb && ./hooks/pre-commit
script: go build github.com/matrix-org/go-neb && ./hooks/pre-commit
notifications:
webhooks:

10
Dockerfile

@ -1,15 +1,13 @@
# Build go-neb
FROM golang:1.11-alpine as builder
FROM golang:1.14-alpine as builder
RUN apk add --no-cache -t build-deps git gcc musl-dev go
COPY . /tmp/go-neb
WORKDIR /tmp/go-neb
RUN go get -u github.com/constabulary/gb/... \
&& go get github.com/golang/lint/golint \
RUN go get golang.org/x/lint/golint \
&& go get github.com/fzipp/gocyclo \
&& gb vendor restore \
&& gb build -f github.com/matrix-org/go-neb
&& go build github.com/matrix-org/go-neb
# Ensures we're lint-free
RUN /tmp/go-neb/hooks/pre-commit
@ -23,7 +21,7 @@ ENV BIND_ADDRESS=:4050 \
UID=1337 \
GID=1337
COPY --from=builder /tmp/go-neb/bin/go-neb /usr/local/bin/go-neb
COPY --from=builder /tmp/go-neb/go-neb /usr/local/bin/go-neb
RUN apk add --no-cache \
ca-certificates \
su-exec \

17
README.md

@ -19,11 +19,11 @@ Go-NEB is a [Matrix](https://matrix.org) bot written in Go. It is the successor
# Quick Start
Clone and run (Requires Go 1.7+ and GB):
Clone and run (Requires Go 1.14+):
```bash
gb build github.com/matrix-org/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=http://localhost:4050 bin/go-neb
go build github.com/matrix-org/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=http://localhost:4050 ./go-neb
```
Get a Matrix user ID and access token and give it to Go-NEB:
@ -85,23 +85,20 @@ Invite the bot user into a Matrix room and type `!echo hello world`. It will rep
# Installing
Go-NEB is built using Go 1.7+ and [GB](https://getgb.io/). Once you have installed Go, run the following commands:
Go-NEB is built using Go 1.14+. Once you have installed Go, run the following commands:
```bash
# Install gb
go get github.com/constabulary/gb/...
# Clone the go-neb repository
git clone https://github.com/matrix-org/go-neb
cd go-neb
# Build go-neb
gb build github.com/matrix-org/go-neb
go build github.com/matrix-org/go-neb
```
# Running
Go-NEB uses environment variables to configure its SQLite database and bind address. To run Go-NEB, run the following command:
```bash
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=https://public.facing.endpoint bin/go-neb
BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 BASE_URL=https://public.facing.endpoint ./go-neb
```
- `BIND_ADDRESS` is the port to listen on.
- `DATABASE_TYPE` MUST be "sqlite3". No other type is supported.
@ -172,7 +169,7 @@ things like linting. Some of them are bundled with go (fmt and vet) but some
are not. You should install the ones which are not:
```bash
go get github.com/golang/lint/golint
go get golang.org/x/lint/golint
go get github.com/fzipp/gocyclo
```

0
src/github.com/matrix-org/go-neb/api/api.go → api/api.go

2
src/github.com/matrix-org/go-neb/api/handlers/auth.go → api/handlers/auth.go

@ -7,12 +7,12 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/api"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/metrics"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/util"
log "github.com/sirupsen/logrus"
)
// RequestAuthSession represents an HTTP handler capable of processing /admin/requestAuthSession requests.

0
src/github.com/matrix-org/go-neb/api/handlers/client.go → api/handlers/client.go

0
src/github.com/matrix-org/go-neb/api/handlers/heartbeat.go → api/handlers/heartbeat.go

2
src/github.com/matrix-org/go-neb/api/handlers/service.go → api/handlers/service.go

@ -7,7 +7,6 @@ import (
"net/http"
"sync"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/api"
"github.com/matrix-org/go-neb/clients"
"github.com/matrix-org/go-neb/database"
@ -17,6 +16,7 @@ import (
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
"github.com/matrix-org/util"
log "github.com/sirupsen/logrus"
)
// ConfigureService represents an HTTP handler which can process /admin/configureService requests.

2
src/github.com/matrix-org/go-neb/api/handlers/webhook.go → api/handlers/webhook.go

@ -5,10 +5,10 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/clients"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/metrics"
log "github.com/sirupsen/logrus"
)
// Webhook represents an HTTP handler capable of accepting webhook requests on behalf of services.

6
src/github.com/matrix-org/go-neb/clients/clients.go → clients/clients.go

@ -8,7 +8,6 @@ import (
"sync"
"time"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/api"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/matrix"
@ -16,6 +15,7 @@ import (
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
shellwords "github.com/mattn/go-shellwords"
log "github.com/sirupsen/logrus"
)
// A Clients is a collection of clients used for bot services.
@ -278,7 +278,7 @@ func runExpansionsForService(expans []types.Expansion, event *gomatrix.Event, bo
func (c *Clients) onBotOptionsEvent(client *gomatrix.Client, event *gomatrix.Event) {
// see if these options are for us. The state key is the user ID with a leading _
// to get around restrictions in the HS about having user IDs as state keys.
targetUserID := strings.TrimPrefix(event.StateKey, "_")
targetUserID := strings.TrimPrefix(*event.StateKey, "_")
if targetUserID != client.UserID {
return
}
@ -300,7 +300,7 @@ func (c *Clients) onBotOptionsEvent(client *gomatrix.Client, event *gomatrix.Eve
}
func (c *Clients) onRoomMemberEvent(client *gomatrix.Client, event *gomatrix.Event) {
if event.StateKey != client.UserID {
if *event.StateKey != client.UserID {
return // not our member event
}
m := event.Content["membership"]

0
src/github.com/matrix-org/go-neb/clients/clients_test.go → clients/clients_test.go

0
src/github.com/matrix-org/go-neb/database/db.go → database/db.go

0
src/github.com/matrix-org/go-neb/database/interface.go → database/interface.go

0
src/github.com/matrix-org/go-neb/database/schema.go → database/schema.go

56
go.mod

@ -0,0 +1,56 @@
module github.com/matrix-org/go-neb
go 1.14
require (
github.com/PuerkitoBio/goquery v1.5.1 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/andygrunwald/go-jira v1.11.0
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/dghubble/oauth1 v0.6.0
github.com/die-net/lrucache v0.0.0-20190707192454-883874fe3947
github.com/go-kit/kit v0.9.0 // indirect
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.4.0 // indirect
github.com/google/go-github v2.0.1-0.20160719063544-b5e5babef39c+incompatible
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/jaytaylor/html2text v0.0.0-20200220170450-61d9dc4d7195
github.com/json-iterator/go v1.1.9 // indirect
github.com/julienschmidt/httprouter v1.2.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/lib/pq v1.3.0
github.com/matrix-org/dugong v0.0.0-20180820122854-51a565b5666b
github.com/matrix-org/gomatrix v0.0.0-20200128155335-9e7906b6766d
github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7
github.com/mattn/go-shellwords v1.0.10
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mmcdole/gofeed v1.0.0-beta2
github.com/mmcdole/goxpp v0.0.0-20181012175147-0068e33feabf // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 // indirect
github.com/olekukonko/tablewriter v0.0.4 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/client_golang v0.8.1-0.20160916180340-5636dc67ae77
github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 // indirect
github.com/prometheus/common v0.0.0-20161002210234-85637ea67b04 // indirect
github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 // indirect
github.com/russross/blackfriday v1.5.2
github.com/sirupsen/logrus v1.4.2
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
github.com/stretchr/testify v1.4.0 // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 // indirect
golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.8
)

191
go.sum

@ -0,0 +1,191 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/PuerkitoBio/goquery v1.5.1 h1:PSPBGne8NIUWw+/7vFBV+kG2J/5MOjbzc7154OaKCSE=
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/andygrunwald/go-jira v1.11.0 h1:XDPU+WAKDBHvp+lqZRf3NpUrKPB4ZNetUfclRA4ew9M=
github.com/andygrunwald/go-jira v1.11.0/go.mod h1:jYi4kFDbRPZTJdJOVJO4mpMMIwdB+rcZwSO58DzPd2I=
github.com/andygrunwald/go-jira v1.12.0 h1:JJi2cEDmDxVtTXxC8ruLDbtOU6pA4OLeL0niyfNcoWw=
github.com/andygrunwald/go-jira v1.12.0/go.mod h1:jYi4kFDbRPZTJdJOVJO4mpMMIwdB+rcZwSO58DzPd2I=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dghubble/oauth1 v0.6.0 h1:m1yC01Ohc/eF38jwZ8JUjL1a+XHHXtGQgK+MxQbmSx0=
github.com/dghubble/oauth1 v0.6.0/go.mod h1:8pFdfPkv/jr8mkChVbNVuJ0suiHe278BtWI4Tk1ujxk=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/die-net/lrucache v0.0.0-20190707192454-883874fe3947 h1:U/5Sq2nJQ0XDyks+8ATghtHSuquIGq7JYrqSrvtR2dg=
github.com/die-net/lrucache v0.0.0-20190707192454-883874fe3947/go.mod h1:KsMcjmY1UCGl7ozPbdVPDOvLaFeXnptSvtNRczhxNto=
github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v2.0.1-0.20160719063544-b5e5babef39c+incompatible h1:9bbdREkf94ZqDMJ3Nsy5cJYNswJW2Xiirp+YuuuGAKM=
github.com/google/go-github v2.0.1-0.20160719063544-b5e5babef39c+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github v16.0.0+incompatible h1:omSHCJqM3CNG6RFFfGmIqGVbdQS2U3QVQSqACgwV1PY=
github.com/google/go-github v16.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 h1:zLTLjkaOFEFIOxY5BWLFLwh+cL8vOBW4XJ2aqLE/Tf0=
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/jaytaylor/html2text v0.0.0-20200220170450-61d9dc4d7195 h1:j0UEFmS7wSjAwKEIkgKBn8PRDfjcuggzr93R9wk53nQ=
github.com/jaytaylor/html2text v0.0.0-20200220170450-61d9dc4d7195/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/matrix-org/dugong v0.0.0-20180820122854-51a565b5666b h1:xpcmnpfUImRC4O2SAS/dmTcJENDXvGmLUzey76V1R3Q=
github.com/matrix-org/dugong v0.0.0-20180820122854-51a565b5666b/go.mod h1:NgPCr+UavRGH6n5jmdX8DuqFZ4JiCWIJoZiuhTRLSUg=
github.com/matrix-org/gomatrix v0.0.0-20200128155335-9e7906b6766d h1:Vf/EQgAfg8/CBUQv9te7UJreZ9iKKouB2gb8UIRM4jQ=
github.com/matrix-org/gomatrix v0.0.0-20200128155335-9e7906b6766d/go.mod h1:3fxX6gUjWyI/2Bt7J1OLhpCzOfO/bB3AiX0cJtEKud0=
github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7 h1:ntrLa/8xVzeSs8vHFHK25k0C+NV74sYMJnNSg5NoSRo=
github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7/go.mod h1:vVQlW/emklohkZnOPwD3LrZUBqdfsbiyO3p1lNV8F6U=
github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw=
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.13.0 h1:LnJI81JidiW9r7pS/hXe6cFeO5EXNq7KbfvoJLRI69c=
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mmcdole/gofeed v1.0.0-beta2 h1:CjQ0ADhAwNSb08zknAkGOEYqr8zfZKfrzgk9BxpWP2E=
github.com/mmcdole/gofeed v1.0.0-beta2/go.mod h1:/BF9JneEL2/flujm8XHoxUcghdTV6vvb3xx/vKyChFU=
github.com/mmcdole/goxpp v0.0.0-20181012175147-0068e33feabf h1:sWGE2v+hO0Nd4yFU/S/mDBM5plIU8v/Qhfz41hkDIAI=
github.com/mmcdole/goxpp v0.0.0-20181012175147-0068e33feabf/go.mod h1:pasqhqstspkosTneA62Nc+2p9SOBBYAPbnmRRWPQ0V8=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.8.1-0.20160916180340-5636dc67ae77 h1:YXoHPWLq9PIcMoZg7znMmEzqYHBszdXSemwGQRJoiSk=
github.com/prometheus/client_golang v0.8.1-0.20160916180340-5636dc67ae77/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.5.0 h1:Ctq0iGpCmr3jeP77kbF2UxgvRwzWWz+4Bh9/vJTyg1A=
github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 h1:0E/5GnGmzoDCtmzTycjGDWW33H0UBmAhR0h+FC8hWLs=
github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20161002210234-85637ea67b04 h1:ScZ/BRzCsrcF/kvwkCSrfbJKVYwFN4adadN0ejBsMkY=
github.com/prometheus/common v0.0.0-20161002210234-85637ea67b04/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.1.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.3.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.5.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/common v0.8.0/go.mod h1:PC/OgXc+UN7B4ALwvn1yzVZmVwvhXp5JsbBv6wSv6i0=
github.com/prometheus/common v0.9.0/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 h1:ex32PG6WhE5zviWS08vcXTwX2IkaH9zpeYZZvrmj3/U=
github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo=
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/trivago/tgo v1.0.1 h1:bxatjJIXNIpV18bucU4Uk/LaoxvxuOlp/oowRHyncLQ=
github.com/trivago/tgo v1.0.1/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg=
golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

7
src/github.com/matrix-org/go-neb/goneb.go → goneb.go

@ -9,7 +9,7 @@ import (
"os"
"path/filepath"
log "github.com/Sirupsen/logrus"
_ "github.com/lib/pq"
"github.com/matrix-org/dugong"
"github.com/matrix-org/go-neb/api"
"github.com/matrix-org/go-neb/api/handlers"
@ -35,6 +35,7 @@ import (
"github.com/matrix-org/util"
_ "github.com/mattn/go-sqlite3"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2"
)
@ -229,9 +230,7 @@ func main() {
if e.LogDir != "" {
log.AddHook(dugong.NewFSHook(
filepath.Join(e.LogDir, "info.log"),
filepath.Join(e.LogDir, "warn.log"),
filepath.Join(e.LogDir, "error.log"),
filepath.Join(e.LogDir, "go-neb.log"),
&log.TextFormatter{
TimestampFormat: "2006-01-02 15:04:05.000000",
DisableColors: true,

0
src/github.com/matrix-org/go-neb/goneb_services_test.go → goneb_services_test.go

10
hooks/pre-commit

@ -2,8 +2,8 @@
set -eu
golint src/...
go fmt ./src/...
go tool vet --shadow ./src
gocyclo -over 12 src/
gb test -timeout 5s -test.v
golint ./...
go fmt ./...
go vet -composites=false ./...
gocyclo -over 12 .
go test ./...

2
src/github.com/matrix-org/go-neb/matrix/matrix.go → matrix/matrix.go

@ -3,10 +3,10 @@ package matrix
import (
"encoding/json"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/api"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// NEBStore implements the gomatrix.Storer interface.

0
src/github.com/matrix-org/go-neb/metrics/metrics.go → metrics/metrics.go

2
src/github.com/matrix-org/go-neb/polling/polling.go → polling/polling.go

@ -5,10 +5,10 @@ import (
"sync"
"time"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/clients"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/types"
log "github.com/sirupsen/logrus"
)
// Remember when we first started polling on this service ID. Polling routines will

2
src/github.com/matrix-org/go-neb/realms/github/github.go → realms/github/github.go

@ -9,11 +9,11 @@ import (
"net/http"
"net/url"
log "github.com/Sirupsen/logrus"
"github.com/google/go-github/github"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/services/github/client"
"github.com/matrix-org/go-neb/types"
log "github.com/sirupsen/logrus"
)
// RealmType of the Github Realm

2
src/github.com/matrix-org/go-neb/realms/jira/jira.go → realms/jira/jira.go

@ -12,12 +12,12 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
jira "github.com/andygrunwald/go-jira"
"github.com/dghubble/oauth1"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/realms/jira/urls"
"github.com/matrix-org/go-neb/types"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

0
src/github.com/matrix-org/go-neb/realms/jira/urls/urls.go → realms/jira/urls/urls.go

0
src/github.com/matrix-org/go-neb/realms/jira/urls/urls_test.go → realms/jira/urls/urls_test.go

2
src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go → services/alertmanager/alertmanager.go

@ -5,10 +5,10 @@ import (
"bytes"
"encoding/json"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
html "html/template"
"net/http"
"strings"

2
src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager_test.go → services/alertmanager/alertmanager_test.go

@ -178,6 +178,6 @@ func checkSilenceLine(t *testing.T, line string, expectedKeys map[string]string)
}
if matched != len(expectedKeys) {
t.Errorf("number of filter fields got %i, want %i", matched, len(expectedKeys))
t.Errorf("number of filter fields got %d, want %d", matched, len(expectedKeys))
}
}

0
src/github.com/matrix-org/go-neb/services/echo/echo.go → services/echo/echo.go

2
src/github.com/matrix-org/go-neb/services/giphy/giphy.go → services/giphy/giphy.go

@ -9,9 +9,9 @@ import (
"strconv"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Giphy service.

0
src/github.com/matrix-org/go-neb/services/github/client/client.go → services/github/client/client.go

4
src/github.com/matrix-org/go-neb/services/github/github.go → services/github/github.go

@ -12,7 +12,6 @@ import (
"strings"
"bytes"
log "github.com/Sirupsen/logrus"
gogithub "github.com/google/go-github/github"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/matrix"
@ -20,6 +19,7 @@ import (
"github.com/matrix-org/go-neb/services/github/client"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
"html"
)
@ -361,7 +361,7 @@ func (s *Service) githubIssueCloseReopen(roomID, userID string, args []string, s
})
if err != nil {
log.WithField("err", err).Print("Failed to %s issue", verb)
log.WithField("err", err).Printf("Failed to %s issue", verb)
if res == nil {
return nil, fmt.Errorf("Failed to %s issue. Failed to connect to Github", verb)
}

2
src/github.com/matrix-org/go-neb/services/github/github_webhook.go → services/github/github_webhook.go

@ -6,13 +6,13 @@ import (
"sort"
"strings"
log "github.com/Sirupsen/logrus"
gogithub "github.com/google/go-github/github"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/services/github/client"
"github.com/matrix-org/go-neb/services/github/webhook"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// WebhookServiceType of the Github Webhook service.

0
src/github.com/matrix-org/go-neb/services/github/github_webhook_test.go → services/github/github_webhook_test.go

2
src/github.com/matrix-org/go-neb/services/github/webhook/webhook.go → services/github/webhook/webhook.go

@ -11,10 +11,10 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/google/go-github/github"
"github.com/matrix-org/gomatrix"
"github.com/matrix-org/util"
log "github.com/sirupsen/logrus"
)
// OnReceiveRequest processes incoming github webhook requests and returns a

0
src/github.com/matrix-org/go-neb/services/github/webhook/webhook_test.go → services/github/webhook/webhook_test.go

2
src/github.com/matrix-org/go-neb/services/google/google.go → services/google/google.go

@ -11,9 +11,9 @@ import (
"net/url"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Google service

0
src/github.com/matrix-org/go-neb/services/google/google_test.go → services/google/google_test.go

2
src/github.com/matrix-org/go-neb/services/guggy/guggy.go → services/guggy/guggy.go

@ -10,9 +10,9 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Guggy service

4
src/github.com/matrix-org/go-neb/services/guggy/guggy_test.go → services/guggy/guggy_test.go

@ -51,7 +51,7 @@ func TestCommand(t *testing.T) {
}
b, err := json.Marshal(res)
if err != nil {
t.Fatalf("Failed to marshal guggy response", err)
t.Fatalf("Failed to marshal guggy response: %v", err)
}
return &http.Response{
StatusCode: 200,
@ -97,6 +97,6 @@ func TestCommand(t *testing.T) {
cmd := cmds[0]
_, err = cmd.Command("!someroom:hyrule", "@navi:hyrule", []string{"hey", "listen!"})
if err != nil {
t.Fatalf("Failed to process command: ", err.Error())
t.Fatalf("Failed to process command: %s", err.Error())
}
}

2
src/github.com/matrix-org/go-neb/services/imgur/imgur.go → services/imgur/imgur.go

@ -10,9 +10,9 @@ import (
"net/url"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Imgur service

0
src/github.com/matrix-org/go-neb/services/imgur/imgur_test.go → services/imgur/imgur_test.go

4
src/github.com/matrix-org/go-neb/services/jira/jira.go → services/jira/jira.go

@ -12,7 +12,6 @@ import (
"regexp"
"strings"
log "github.com/Sirupsen/logrus"
gojira "github.com/andygrunwald/go-jira"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/matrix"
@ -21,6 +20,7 @@ import (
"github.com/matrix-org/go-neb/services/jira/webhook"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the JIRA Service
@ -216,7 +216,7 @@ func (s *Service) expandIssue(roomID, userID string, issueKeyGroups []string) in
return nil
}
issue, _, err := cli.Issue.Get(issueKey)
issue, _, err := cli.Issue.Get(issueKey, nil)
if err != nil {
logger.WithError(err).Print("Failed to GET issue")
return err

2
src/github.com/matrix-org/go-neb/services/jira/webhook/webhook.go → services/jira/webhook/webhook.go

@ -6,11 +6,11 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
gojira "github.com/andygrunwald/go-jira"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/realms/jira"
"github.com/matrix-org/util"
log "github.com/sirupsen/logrus"
)
type jiraWebhook struct {

2
src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go → services/rssbot/rssbot.go

@ -11,7 +11,6 @@ import (
"time"
"unicode"
log "github.com/Sirupsen/logrus"
"github.com/die-net/lrucache"
"github.com/gregjones/httpcache"
"github.com/matrix-org/go-neb/database"
@ -20,6 +19,7 @@ import (
"github.com/matrix-org/gomatrix"
"github.com/mmcdole/gofeed"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
)
// ServiceType of the RSS Bot service

0
src/github.com/matrix-org/go-neb/services/rssbot/rssbot_test.go → services/rssbot/rssbot_test.go

2
src/github.com/matrix-org/go-neb/services/slackapi/message.go → services/slackapi/message.go

@ -12,9 +12,9 @@ import (
"regexp"
"time"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/gomatrix"
"github.com/russross/blackfriday"
log "github.com/sirupsen/logrus"
)
type slackAttachment struct {

2
src/github.com/matrix-org/go-neb/services/slackapi/slackapi.go → services/slackapi/slackapi.go

@ -4,9 +4,9 @@ import (
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Slack API service

2
src/github.com/matrix-org/go-neb/services/travisci/travisci.go → services/travisci/travisci.go

@ -10,10 +10,10 @@ import (
"strings"
"time"
log "github.com/Sirupsen/logrus"
"github.com/matrix-org/go-neb/database"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Travis-CI service.

0
src/github.com/matrix-org/go-neb/services/travisci/travisci_test.go → services/travisci/travisci_test.go

0
src/github.com/matrix-org/go-neb/services/travisci/verify.go → services/travisci/verify.go

2
src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia.go → services/wikipedia/wikipedia.go

@ -9,10 +9,10 @@ import (
"net/url"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/jaytaylor/html2text"
"github.com/matrix-org/go-neb/types"
"github.com/matrix-org/gomatrix"
log "github.com/sirupsen/logrus"
)
// ServiceType of the Wikipedia service

0
src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go → services/wikipedia/wikipedia_test.go

0
src/github.com/matrix-org/go-neb/testutil_test.go → testutil_test.go

0
src/github.com/matrix-org/go-neb/testutils/testutils.go → testutils/testutils.go

0
src/github.com/matrix-org/go-neb/types/actions.go → types/actions.go

0
src/github.com/matrix-org/go-neb/types/auth.go → types/auth.go

0
src/github.com/matrix-org/go-neb/types/service.go → types/service.go

347
vendor/manifest

@ -1,347 +0,0 @@
{
"version": 0,
"dependencies": [
{
"importpath": "github.com/PuerkitoBio/goquery",
"repository": "https://github.com/PuerkitoBio/goquery",
"revision": "152b1a2c8f5d0340f658bb656032a39b94e52958",
"branch": "master"
},
{
"importpath": "github.com/Sirupsen/logrus",
"repository": "https://github.com/Sirupsen/logrus",
"revision": "a283a10442df8dc09befd873fab202bf8a253d6a",
"branch": "master"
},
{
"importpath": "github.com/andybalholm/cascadia",
"repository": "https://github.com/andybalholm/cascadia",
"revision": "1c31af6f6c1a7b101ed05aacc7d8a738b43ae86e",
"branch": "master"
},
{
"importpath": "github.com/andygrunwald/go-jira",
"repository": "https://github.com/andygrunwald/go-jira",
"revision": "ae45380959ecd26b9c0adcae4c194b7e2253e214",
"branch": "master"
},
{
"importpath": "github.com/beorn7/perks/quantile",
"repository": "https://github.com/beorn7/perks",
"revision": "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9",
"branch": "master",
"path": "/quantile"
},
{
"importpath": "github.com/bradfitz/gomemcache/memcache",
"repository": "https://github.com/bradfitz/gomemcache",
"revision": "fb1f79c6b65acda83063cbc69f6bba1522558bfc",
"branch": "master",
"path": "/memcache"
},
{
"importpath": "github.com/cenkalti/backoff",
"repository": "https://github.com/cenkalti/backoff",
"revision": "cdf48bbc1eb78d1349cbda326a4a037f7ba565c6",
"branch": "master"
},
{
"importpath": "github.com/codegangsta/cli",
"repository": "https://github.com/codegangsta/cli",
"revision": "d53eb991652b1d438abdd34ce4bfa3ef1539108e",
"branch": "master"
},
{
"importpath": "github.com/dghubble/go-twitter/twitter",
"repository": "https://github.com/dghubble/go-twitter",
"revision": "02eb4f9667b1fe4df2265e12d4366506aab0a78f",
"branch": "master",
"path": "/twitter"
},
{
"importpath": "github.com/dghubble/oauth1",
"repository": "https://github.com/dghubble/oauth1",
"revision": "b61f9f49ca0b822c9c681186ce83bed924c98e56",
"branch": "master"
},
{
"importpath": "github.com/dghubble/sling",
"repository": "https://github.com/dghubble/sling",
"revision": "9da07f0db0226d82803fc7374dba08506d29da00",
"branch": "master"
},
{
"importpath": "github.com/die-net/lrucache",
"repository": "https://github.com/die-net/lrucache",
"revision": "0e55cff0d6054f900b91c0b5355fe6a6966fad4b",
"branch": "master"
},
{
"importpath": "github.com/garyburd/redigo/internal",
"repository": "https://github.com/garyburd/redigo",
"revision": "ffa8d46ada782d81cfda81a0fbd9f45ceae448e8",
"branch": "master",
"path": "/internal"
},
{
"importpath": "github.com/garyburd/redigo/redis",
"repository": "https://github.com/garyburd/redigo",
"revision": "ffa8d46ada782d81cfda81a0fbd9f45ceae448e8",
"branch": "master",
"path": "/redis"
},
{
"importpath": "github.com/golang/protobuf/proto",
"repository": "https://github.com/golang/protobuf",
"revision": "98fa357170587e470c5f27d3c3ea0947b71eb455",
"branch": "master",
"path": "/proto"
},
{
"importpath": "github.com/golang/snappy",
"repository": "https://github.com/golang/snappy",
"revision": "d9eb7a3d35ec988b8585d4a0068e462c27d28380",
"branch": "master"
},
{
"importpath": "github.com/google/btree",
"repository": "https://github.com/google/btree",
"revision": "925471ac9e2131377a91e1595defec898166fe49",
"branch": "master"
},
{
"importpath": "github.com/google/go-github/github",
"repository": "https://github.com/google/go-github",
"revision": "b5e5babef39c18002f177a134fc49dc5013374ba",
"branch": "master",
"path": "/github"
},
{
"importpath": "github.com/google/go-querystring/query",
"repository": "https://github.com/google/go-querystring",
"revision": "9235644dd9e52eeae6fa48efd539fdc351a0af53",
"branch": "master",
"path": "/query"
},
{
"importpath": "github.com/gregjones/httpcache",
"repository": "https://github.com/gregjones/httpcache",
"revision": "d02018f006d98f58512bf3adfc171d88d17626df",
"branch": "master"
},
{
"importpath": "github.com/jaytaylor/html2text",
"repository": "https://github.com/jaytaylor/html2text",
"revision": "24f9b0f63599c6bbecc3b773636b54f8d302db67",
"branch": "master"
},
{
"importpath": "github.com/matrix-org/dugong",
"repository": "https://github.com/matrix-org/dugong",
"revision": "193b8f88e381d12f2d53023fba25e43fc81dc5ac",
"branch": "master"
},
{
"importpath": "github.com/matrix-org/gomatrix",
"repository": "https://github.com/matrix-org/gomatrix",
"revision": "e66d1ef529b7851262b49dc42a26ff1f1d1d9e4d",
"branch": "master"
},
{
"importpath": "github.com/matrix-org/util",
"repository": "https://github.com/matrix-org/util",
"revision": "ccef6dc7c24a7c896d96b433a9107b7c47ecf828",
"branch": "master"
},
{
"importpath": "github.com/mattn/go-shellwords",
"repository": "https://github.com/mattn/go-shellwords",
"revision": "525bedee691b5a8df547cb5cf9f86b7fb1883e24",
"branch": "master"
},
{
"importpath": "github.com/mattn/go-sqlite3",
"repository": "https://github.com/mattn/go-sqlite3",
"revision": "e5a3c16c5c1d80b24f633e68aecd6b0702786d3d",
"branch": "master"
},
{
"importpath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"repository": "https://github.com/matttproud/golang_protobuf_extensions",
"revision": "c12348ce28de40eed0136aa2b644d0ee0650e56c",
"branch": "master",
"path": "/pbutil"
},
{
"importpath": "github.com/mmcdole/gofeed",
"repository": "https://github.com/mmcdole/gofeed",
"revision": "1bc2cbeba25b7b594430cff43d7c9e9367cfdca0",
"branch": "HEAD"
},
{
"importpath": "github.com/mmcdole/goxpp",
"repository": "https://github.com/mmcdole/goxpp",
"revision": "e38884aa48c1952a416ba35f3c276e4f02f9b40e",
"branch": "master"
},
{
"importpath": "github.com/peterbourgon/diskv",
"repository": "https://github.com/peterbourgon/diskv",
"revision": "5dfcb07a075adbaaa4094cddfd160b1e1c77a043",
"branch": "master"
},
{
"importpath": "github.com/prometheus/client_golang",
"repository": "https://github.com/prometheus/client_golang",
"revision": "5636dc67ae776adf5590da7349e70fbb9559972d",
"branch": "master"
},
{
"importpath": "github.com/prometheus/client_model/go",
"repository": "https://github.com/prometheus/client_model",
"revision": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
"branch": "master",
"path": "/go"
},
{
"importpath": "github.com/prometheus/common/expfmt",
"repository": "https://github.com/prometheus/common",
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
"branch": "master",
"path": "/expfmt"
},
{
"importpath": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
"repository": "https://github.com/prometheus/common",
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
"branch": "master",
"path": "/internal/bitbucket.org/ww/goautoneg"
},
{
"importpath": "github.com/prometheus/common/model",
"repository": "https://github.com/prometheus/common",
"revision": "85637ea67b04b5c3bb25e671dacded2977f8f9f6",
"branch": "master",
"path": "/model"
},
{
"importpath": "github.com/prometheus/procfs",
"repository": "https://github.com/prometheus/procfs",
"revision": "abf152e5f3e97f2fafac028d2cc06c1feb87ffa5",
"branch": "master"
},
{
"importpath": "github.com/russross/blackfriday",
"repository": "https://github.com/russross/blackfriday",
"revision": "35eb537633d9950afc8ae7bdf0edb6134584e9fc",
"branch": "master"
},
{
"importpath": "github.com/shurcooL/sanitized_anchor_name",
"repository": "https://github.com/shurcooL/sanitized_anchor_name",
"revision": "10ef21a441db47d8b13ebcc5fd2310f636973c77",
"branch": "master"
},
{
"importpath": "github.com/syndtr/goleveldb/leveldb",
"repository": "https://github.com/syndtr/goleveldb",
"revision": "6b4daa5362b502898ddf367c5c11deb9e7a5c727",
"branch": "master",
"path": "/leveldb"
},
{
"importpath": "golang.org/x/net/context",
"repository": "https://go.googlesource.com/net",
"revision": "6a513affb38dc9788b449d59ffed099b8de18fa0",
"branch": "master",
"path": "/context"
},
{
"importpath": "golang.org/x/net/html",
"repository": "https://go.googlesource.com/net",
"revision": "a333c534c871727fb95745870e8b98a69447f2ce",
"branch": "master",
"path": "/html"
},
{
"importpath": "golang.org/x/oauth2",
"repository": "https://go.googlesource.com/oauth2",
"revision": "1364adb2c63445016c5ed4518fc71f6a3cda6169",
"branch": "master"
},
{
"importpath": "golang.org/x/text/encoding",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/encoding"
},
{
"importpath": "golang.org/x/text/internal/tag",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/internal/tag"
},
{
"importpath": "golang.org/x/text/internal/utf8internal",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/internal/utf8internal"
},
{
"importpath": "golang.org/x/text/language",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/language"
},
{
"importpath": "golang.org/x/text/runes",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/runes"
},
{
"importpath": "golang.org/x/text/transform",
"repository": "https://go.googlesource.com/text",
"revision": "a7c023693a94aedd6b6df43ae7526bfe9d2b7d22",
"branch": "master",
"path": "/transform"
},
{
"importpath": "google.golang.org/cloud/compute/metadata",
"repository": "https://code.googlesource.com/gocloud",
"revision": "30fab6304c9888af49f1884cf4eddad7027e2e7b",
"branch": "master",
"path": "/compute/metadata"
},
{
"importpath": "google.golang.org/cloud/internal",
"repository": "https://code.googlesource.com/gocloud",
"revision": "30fab6304c9888af49f1884cf4eddad7027e2e7b",
"branch": "master",
"path": "/internal"
},
{
"importpath": "gopkg.in/airbrake/gobrake.v2",
"repository": "https://gopkg.in/airbrake/gobrake.v2",
"revision": "31c8ff1fb8b79a6947e6565e9a6df535f98a6b94",
"branch": "master"
},
{
"importpath": "gopkg.in/gemnasium/logrus-airbrake-hook.v2",
"repository": "https://gopkg.in/gemnasium/logrus-airbrake-hook.v2",
"revision": "31e6fd4bd5a98d8ee7673d24bc54ec73c31810dd",
"branch": "master"
},
{
"importpath": "gopkg.in/yaml.v2",
"repository": "https://gopkg.in/yaml.v2",
"revision": "a5b47d31c556af34a302ce5d659e6fea44d90de0",
"branch": "v2"
}
]
}

12
vendor/src/github.com/PuerkitoBio/goquery/LICENSE

@ -1,12 +0,0 @@
Copyright (c) 2012-2016, Martin Angers & Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

122
vendor/src/github.com/PuerkitoBio/goquery/README.md

@ -1,122 +0,0 @@
# goquery - a little like that j-thing, only in Go [![build status](https://secure.travis-ci.org/PuerkitoBio/goquery.png)](http://travis-ci.org/PuerkitoBio/goquery) [![GoDoc](https://godoc.org/github.com/PuerkitoBio/goquery?status.png)](http://godoc.org/github.com/PuerkitoBio/goquery)
goquery brings a syntax and a set of features similar to [jQuery][] to the [Go language][go]. It is based on Go's [net/html package][html] and the CSS Selector library [cascadia][]. Since the net/html parser returns nodes, and not a full-featured DOM tree, jQuery's stateful manipulation functions (like height(), css(), detach()) have been left off.
Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML. See the [wiki][] for various options to do this.
Syntax-wise, it is as close as possible to jQuery, with the same function names when possible, and that warm and fuzzy chainable interface. jQuery being the ultra-popular library that it is, I felt that writing a similar HTML-manipulating library was better to follow its API than to start anew (in the same spirit as Go's `fmt` package), even though some of its methods are less than intuitive (looking at you, [index()][index]...).
## Installation
Please note that because of the net/html dependency, goquery requires Go1.1+.
$ go get github.com/PuerkitoBio/goquery
(optional) To run unit tests:
$ cd $GOPATH/src/github.com/PuerkitoBio/goquery
$ go test
(optional) To run benchmarks (warning: it runs for a few minutes):
$ cd $GOPATH/src/github.com/PuerkitoBio/goquery
$ go test -bench=".*"
## Changelog
**Note that goquery's API is now stable, and will not break.**
* **2016-08-28 (v1.0.1)** : Optimize performance for large documents.
* **2016-07-27 (v1.0.0)** : Tag version 1.0.0.
* **2016-06-15** : Invalid selector strings internally compile to a `Matcher` implementation that never matches any node (instead of a panic). So for example, `doc.Find("~")` returns an empty `*Selection` object.
* **2016-02-02** : Add `NodeName` utility function similar to the DOM's `nodeName` property. It returns the tag name of the first element in a selection, and other relevant values of non-element nodes (see godoc for details). Add `OuterHtml` utility function similar to the DOM's `outerHTML` property (named `OuterHtml` in small caps for consistency with the existing `Html` method on the `Selection`).
* **2015-04-20** : Add `AttrOr` helper method to return the attribute's value or a default value if absent. Thanks to [piotrkowalczuk][piotr].
* **2015-02-04** : Add more manipulation functions - Prepend* - thanks again to [Andrew Stone][thatguystone].
* **2014-11-28** : Add more manipulation functions - ReplaceWith*, Wrap* and Unwrap - thanks again to [Andrew Stone][thatguystone].
* **2014-11-07** : Add manipulation functions (thanks to [Andrew Stone][thatguystone]) and `*Matcher` functions, that receive compiled cascadia selectors instead of selector strings, thus avoiding potential panics thrown by goquery via `cascadia.MustCompile` calls. This results in better performance (selectors can be compiled once and reused) and more idiomatic error handling (you can handle cascadia's compilation errors, instead of recovering from panics, which had been bugging me for a long time). Note that the actual type expected is a `Matcher` interface, that `cascadia.Selector` implements. Other matcher implementations could be used.
* **2014-11-06** : Change import paths of net/html to golang.org/x/net/html (see https://groups.google.com/forum/#!topic/golang-nuts/eD8dh3T9yyA). Make sure to update your code to use the new import path too when you call goquery with `html.Node`s.
* **v0.3.2** : Add `NewDocumentFromReader()` (thanks jweir) which allows creating a goquery document from an io.Reader.
* **v0.3.1** : Add `NewDocumentFromResponse()` (thanks assassingj) which allows creating a goquery document from an http response.
* **v0.3.0** : Add `EachWithBreak()` which allows to break out of an `Each()` loop by returning false. This function was added instead of changing the existing `Each()` to avoid breaking compatibility.
* **v0.2.1** : Make go-getable, now that [go.net/html is Go1.0-compatible][gonet] (thanks to @matrixik for pointing this out).
* **v0.2.0** : Add support for negative indices in Slice(). **BREAKING CHANGE** `Document.Root` is removed, `Document` is now a `Selection` itself (a selection of one, the root element, just like `Document.Root` was before). Add jQuery's Closest() method.
* **v0.1.1** : Add benchmarks to use as baseline for refactorings, refactor Next...() and Prev...() methods to use the new html package's linked list features (Next/PrevSibling, FirstChild). Good performance boost (40+% in some cases).
* **v0.1.0** : Initial release.
## API
goquery exposes two structs, `Document` and `Selection`, and the `Matcher` interface. Unlike jQuery, which is loaded as part of a DOM document, and thus acts on its containing document, goquery doesn't know which HTML document to act upon. So it needs to be told, and that's what the `Document` type is for. It holds the root document node as the initial Selection value to manipulate.
jQuery often has many variants for the same function (no argument, a selector string argument, a jQuery object argument, a DOM element argument, ...). Instead of exposing the same features in goquery as a single method with variadic empty interface arguments, statically-typed signatures are used following this naming convention:
* When the jQuery equivalent can be called with no argument, it has the same name as jQuery for the no argument signature (e.g.: `Prev()`), and the version with a selector string argument is called `XxxFiltered()` (e.g.: `PrevFiltered()`)
* When the jQuery equivalent **requires** one argument, the same name as jQuery is used for the selector string version (e.g.: `Is()`)
* The signatures accepting a jQuery object as argument are defined in goquery as `XxxSelection()` and take a `*Selection` object as argument (e.g.: `FilterSelection()`)
* The signatures accepting a DOM element as argument in jQuery are defined in goquery as `XxxNodes()` and take a variadic argument of type `*html.Node` (e.g.: `FilterNodes()`)
* The signatures accepting a function as argument in jQuery are defined in goquery as `XxxFunction()` and take a function as argument (e.g.: `FilterFunction()`)
* The goquery methods that can be called with a selector string have a corresponding version that take a `Matcher` interface and are defined as `XxxMatcher()` (e.g.: `IsMatcher()`)
Utility functions that are not in jQuery but are useful in Go are implemented as functions (that take a `*Selection` as parameter), to avoid a potential naming clash on the `*Selection`'s methods (reserved for jQuery-equivalent behaviour).
The complete [godoc reference documentation can be found here][doc].
Please note that Cascadia's selectors do not necessarily match all supported selectors of jQuery (Sizzle). See the [cascadia project][cascadia] for details. Invalid selector strings compile to a `Matcher` that fails to match any node. Behaviour of the various functions that take a selector string as argument follows from that fact, e.g. (where `~` is an invalid selector string):
* `Find("~")` returns an empty selection because the selector string doesn't match anything.
* `Add("~")` returns a new selection that holds the same nodes as the original selection, because it didn't add any node (selector string didn't match anything).
* `ParentsFiltered("~")` returns an empty selection because the selector string doesn't match anything.
* `ParentsUntil("~")` returns all parents of the selection because the selector string didn't match any element to stop before the top element.
## Examples
See some tips and tricks in the [wiki][].
Adapted from example_test.go:
```Go
package main
import (
"fmt"
"log"
"github.com/PuerkitoBio/goquery"
)
func ExampleScrape() {
doc, err := goquery.NewDocument("http://metalsucks.net")
if err != nil {
log.Fatal(err)
}
// Find the review items
doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) {
// For each item found, get the band and title
band := s.Find("a").Text()
title := s.Find("i").Text()
fmt.Printf("Review %d: %s - %s\n", i, band, title)
})
}
func main() {
ExampleScrape()
}
```
## License
The [BSD 3-Clause license][bsd], the same as the [Go language][golic]. Cascadia's license is [here][caslic].
[jquery]: http://jquery.com/
[go]: http://golang.org/
[cascadia]: https://github.com/andybalholm/cascadia
[bsd]: http://opensource.org/licenses/BSD-3-Clause
[golic]: http://golang.org/LICENSE
[caslic]: https://github.com/andybalholm/cascadia/blob/master/LICENSE
[doc]: http://godoc.org/github.com/PuerkitoBio/goquery
[index]: http://api.jquery.com/index/
[gonet]: https://github.com/golang/net/
[html]: http://godoc.org/golang.org/x/net/html
[wiki]: https://github.com/PuerkitoBio/goquery/wiki/Tips-and-tricks
[thatguystone]: https://github.com/thatguystone
[piotr]: https://github.com/piotrkowalczuk

103
vendor/src/github.com/PuerkitoBio/goquery/array.go

@ -1,103 +0,0 @@
package goquery
import (
"golang.org/x/net/html"
)
// 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.
func (s *Selection) First() *Selection {
return s.Eq(0)
}
// 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.
func (s *Selection) Last() *Selection {
return s.Eq(-1)
}
// Eq reduces the set of matched elements to the one at the specified index.
// If a negative index is given, it counts backwards starting at the end of the
// set. It returns a new Selection object, and an empty Selection object if the
// index is invalid.
func (s *Selection) Eq(index int) *Selection {
if index < 0 {
index += len(s.Nodes)
}
if index >= len(s.Nodes) || index < 0 {
return newEmptySelection(s.document)
}
return s.Slice(index, index+1)
}
// Slice reduces the set of matched elements to a subset specified by a range
// of indices.
func (s *Selection) Slice(start, end int) *Selection {
if start < 0 {
start += len(s.Nodes)
}
if end < 0 {
end += len(s.Nodes)
}
return pushStack(s, s.Nodes[start:end])
}
// Get retrieves the underlying node at the specified index.
// Get without parameter is not implemented, since the node array is available
// on the Selection object.
func (s *Selection) Get(index int) *html.Node {
if index < 0 {
index += len(s.Nodes) // Negative index gets from the end
}
return s.Nodes[index]
}
// Index returns the position of the first element within the Selection object
// relative to its sibling elements.
func (s *Selection) Index() int {
if len(s.Nodes) > 0 {
return newSingleSelection(s.Nodes[0], s.document).PrevAll().Length()
}
return -1
}
// IndexSelector returns the position of the first element within the
// Selection object relative to the elements matched by the selector, or -1 if
// not found.
func (s *Selection) IndexSelector(selector string) int {
if len(s.Nodes) > 0 {
sel := s.document.Find(selector)
return indexInSlice(sel.Nodes, s.Nodes[0])
}
return -1
}
// IndexMatcher returns the position of the first element within the
// Selection object relative to the elements matched by the matcher, or -1 if
// not found.
func (s *Selection) IndexMatcher(m Matcher) int {
if len(s.Nodes) > 0 {
sel := s.document.FindMatcher(m)
return indexInSlice(sel.Nodes, s.Nodes[0])
}
return -1
}
// IndexOfNode returns the position of the specified node within the Selection
// object, or -1 if not found.
func (s *Selection) IndexOfNode(node *html.Node) int {
return indexInSlice(s.Nodes, node)
}
// IndexOfSelection returns the position of the first node in the specified
// Selection object within this Selection object, or -1 if not found.
func (s *Selection) IndexOfSelection(sel *Selection) int {
if sel != nil && len(sel.Nodes) > 0 {
return indexInSlice(s.Nodes, sel.Nodes[0])
}
return -1
}

212
vendor/src/github.com/PuerkitoBio/goquery/array_test.go

@ -1,212 +0,0 @@
package goquery
import (
"testing"
)
func TestFirst(t *testing.T) {
sel := Doc().Find(".pvk-content").First()
assertLength(t, sel.Nodes, 1)
}
func TestFirstEmpty(t *testing.T) {
sel := Doc().Find(".pvk-zzcontentzz").First()
assertLength(t, sel.Nodes, 0)
}
func TestFirstInvalid(t *testing.T) {
sel := Doc().Find("").First()
assertLength(t, sel.Nodes, 0)
}
func TestFirstRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.First().End()
assertEqual(t, sel, sel2)
}
func TestLast(t *testing.T) {
sel := Doc().Find(".pvk-content").Last()
assertLength(t, sel.Nodes, 1)
// Should contain Footer
foot := Doc().Find(".footer")
if !sel.Contains(foot.Nodes[0]) {
t.Error("Last .pvk-content should contain .footer.")
}
}
func TestLastEmpty(t *testing.T) {
sel := Doc().Find(".pvk-zzcontentzz").Last()
assertLength(t, sel.Nodes, 0)
}
func TestLastInvalid(t *testing.T) {
sel := Doc().Find("").Last()
assertLength(t, sel.Nodes, 0)
}
func TestLastRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Last().End()
assertEqual(t, sel, sel2)
}
func TestEq(t *testing.T) {
sel := Doc().Find(".pvk-content").Eq(1)
assertLength(t, sel.Nodes, 1)
}
func TestEqNegative(t *testing.T) {
sel := Doc().Find(".pvk-content").Eq(-1)
assertLength(t, sel.Nodes, 1)
// Should contain Footer
foot := Doc().Find(".footer")
if !sel.Contains(foot.Nodes[0]) {
t.Error("Index -1 of .pvk-content should contain .footer.")
}
}
func TestEqEmpty(t *testing.T) {
sel := Doc().Find("something_random_that_does_not_exists").Eq(0)
assertLength(t, sel.Nodes, 0)
}
func TestEqInvalid(t *testing.T) {
sel := Doc().Find("").Eq(0)
assertLength(t, sel.Nodes, 0)
}
func TestEqInvalidPositive(t *testing.T) {
sel := Doc().Find(".pvk-content").Eq(3)
assertLength(t, sel.Nodes, 0)
}
func TestEqInvalidNegative(t *testing.T) {
sel := Doc().Find(".pvk-content").Eq(-4)
assertLength(t, sel.Nodes, 0)
}
func TestEqRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Eq(1).End()
assertEqual(t, sel, sel2)
}
func TestSlice(t *testing.T) {
sel := Doc().Find(".pvk-content").Slice(0, 2)
assertLength(t, sel.Nodes, 2)
}
func TestSliceEmpty(t *testing.T) {
defer assertPanic(t)
Doc().Find("x").Slice(0, 2)
}
func TestSliceInvalid(t *testing.T) {
defer assertPanic(t)
Doc().Find("").Slice(0, 2)
}
func TestSliceOutOfBounds(t *testing.T) {
defer assertPanic(t)
Doc().Find(".pvk-content").Slice(2, 12)
}
func TestNegativeSliceStart(t *testing.T) {
sel := Doc().Find(".container-fluid").Slice(-2, 3)
assertLength(t, sel.Nodes, 1)
assertSelectionIs(t, sel.Eq(0), "#cf3")
}
func TestNegativeSliceEnd(t *testing.T) {
sel := Doc().Find(".container-fluid").Slice(1, -1)
assertLength(t, sel.Nodes, 2)
assertSelectionIs(t, sel.Eq(0), "#cf2")
assertSelectionIs(t, sel.Eq(1), "#cf3")
}
func TestNegativeSliceBoth(t *testing.T) {
sel := Doc().Find(".container-fluid").Slice(-3, -1)
assertLength(t, sel.Nodes, 2)
assertSelectionIs(t, sel.Eq(0), "#cf2")
assertSelectionIs(t, sel.Eq(1), "#cf3")
}
func TestNegativeSliceOutOfBounds(t *testing.T) {
defer assertPanic(t)
Doc().Find(".container-fluid").Slice(-12, -7)
}
func TestSliceRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Slice(0, 2).End()
assertEqual(t, sel, sel2)
}
func TestGet(t *testing.T) {
sel := Doc().Find(".pvk-content")
node := sel.Get(1)
if sel.Nodes[1] != node {
t.Errorf("Expected node %v to be %v.", node, sel.Nodes[1])
}
}
func TestGetNegative(t *testing.T) {
sel := Doc().Find(".pvk-content")
node := sel.Get(-3)
if sel.Nodes[0] != node {
t.Errorf("Expected node %v to be %v.", node, sel.Nodes[0])
}
}
func TestGetInvalid(t *testing.T) {
defer assertPanic(t)
sel := Doc().Find(".pvk-content")
sel.Get(129)
}
func TestIndex(t *testing.T) {
sel := Doc().Find(".pvk-content")
if i := sel.Index(); i != 1 {
t.Errorf("Expected index of 1, got %v.", i)
}
}
func TestIndexSelector(t *testing.T) {
sel := Doc().Find(".hero-unit")
if i := sel.IndexSelector("div"); i != 4 {
t.Errorf("Expected index of 4, got %v.", i)
}
}
func TestIndexSelectorInvalid(t *testing.T) {
sel := Doc().Find(".hero-unit")
if i := sel.IndexSelector(""); i != -1 {
t.Errorf("Expected index of -1, got %v.", i)
}
}
func TestIndexOfNode(t *testing.T) {
sel := Doc().Find("div.pvk-gutter")
if i := sel.IndexOfNode(sel.Nodes[1]); i != 1 {
t.Errorf("Expected index of 1, got %v.", i)
}
}
func TestIndexOfNilNode(t *testing.T) {
sel := Doc().Find("div.pvk-gutter")
if i := sel.IndexOfNode(nil); i != -1 {
t.Errorf("Expected index of -1, got %v.", i)
}
}
func TestIndexOfSelection(t *testing.T) {
sel := Doc().Find("div")
sel2 := Doc().Find(".hero-unit")
if i := sel.IndexOfSelection(sel2); i != 4 {
t.Errorf("Expected index of 4, got %v.", i)
}
}

436
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.0

@ -1,436 +0,0 @@
PASS
BenchmarkFirst 20000000 92.9 ns/op
BenchmarkLast 20000000 91.6 ns/op
BenchmarkEq 20000000 90.6 ns/op
BenchmarkSlice 20000000 86.7 ns/op
BenchmarkGet 1000000000 2.14 ns/op
BenchmarkIndex 500000 5308 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 50000 54962 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 11.4 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 12.1 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 5000 327144 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 50000 52945 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 205 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 203 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2639 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 50000 30182 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 50000 34855 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 66052 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 69721 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 66077 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 20000 80021 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 66256 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 20000 79568 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 569441 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 230585 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 231470 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.65 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 9558 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 16809 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkAttr 50000000 37.5 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 100000 18583 ns/op
BenchmarkLength 2000000000 0.80 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 666 ns/op
BenchmarkIs 50000 34328 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 50000 32423 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2707 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 66976 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 66740 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 701722 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.9 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 50000 55444 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 10000 127984 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 355944 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 355596 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 500000 5656 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 200000 9007 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 1000000 1237 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 5613 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 47026 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 51438 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 91820 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 95156 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 10000 134383 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 235456 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 235936 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 50000 32451 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 50000 30570 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 50000 30729 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 10000 106704 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 10000 115592 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 50000 54449 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 50000 58503 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 20000 77698 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 20000 85034 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 50000 56458 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 50000 60163 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 50000 47679 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 50000 51563 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 10000 213998 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 10000 140720 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 20000 90702 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 5000 456039 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 10000 167944 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 20000 82059 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 10000 150883 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 10000 146578 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 10000 148284 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 10000 154303 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 10000 149062 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 10000 150584 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
ok github.com/PuerkitoBio/goquery 188.326s

438
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.1

@ -1,438 +0,0 @@
PASS
BenchmarkFirst 20000000 96.2 ns/op
BenchmarkLast 20000000 95.8 ns/op
BenchmarkEq 20000000 94.4 ns/op
BenchmarkSlice 20000000 89.9 ns/op
BenchmarkGet 1000000000 2.31 ns/op
BenchmarkIndex 1000000 1911 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 50000 56034 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 11.8 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 12.1 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 5000 336823 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 50000 54709 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 209 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 202 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2634 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 50000 31049 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 50000 35167 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 68974 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 74760 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 68670 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 20000 81357 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 68388 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 20000 82108 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 582934 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 241602 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 243612 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.14 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 9848 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 17569 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkAttr 50000000 37.6 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 100000 19345 ns/op
BenchmarkLength 2000000000 0.80 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 688 ns/op
BenchmarkIs 50000 35061 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 50000 32789 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2816 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 68272 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 68107 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 709386 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 12.4 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 50000 56342 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 10000 131878 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 374240 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 374447 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 200000 9721 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 200000 12909 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 1000000 1869 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 5941 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 46223 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 51452 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 93967 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 97617 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 10000 138898 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 247817 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 246055 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 50000 33201 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 50000 31486 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 50000 31754 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 20000 94749 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 10000 103926 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 50000 33782 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 50000 37108 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 64769 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 71050 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 50000 33908 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 50000 37353 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 50000 31056 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 50000 34286 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 10000 202553 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 20000 98693 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 50000 45532 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 5000 454378 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 10000 123594 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 50000 37509 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 10000 109317 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 10000 105959 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 10000 107132 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 10000 114474 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 10000 107592 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 10000 107495 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
ok github.com/PuerkitoBio/goquery 187.652s

405
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.1.1-v0.2.1-go1.1rc1.svg

@ -1,405 +0,0 @@
<?xml version="1.0"?>
<!-- Generated by SVGo -->
<svg width="1024" height="768"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g style="font-size:20px;font-family:sans-serif">
<rect x="0" y="0" width="1024" height="768" style="fill:white"/>
<text x="100" y="50" style="font-size:150%"></text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="118" width="0" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="607" y="133" style="text-anchor:end">+0.10%</text>
</g>
<text x="100" y="138" style="text-anchor:start">BenchmarkFirst</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="144" width="0" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="617" y="159" style="text-anchor:start">-0.10%</text>
</g>
<text x="100" y="164" style="text-anchor:start">BenchmarkLast</text>
<g style="font-style:italic;font-size:75%">
<rect x="604" y="170" width="8" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="599" y="185" style="text-anchor:end">+2.86%</text>
</g>
<text x="100" y="190" style="text-anchor:start">BenchmarkEq</text>
<g style="font-style:italic;font-size:75%">
<rect x="604" y="196" width="8" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="599" y="211" style="text-anchor:end">+2.67%</text>
</g>
<text x="100" y="216" style="text-anchor:start">BenchmarkSlice</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="222" width="32" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="649" y="237" style="text-anchor:start">-10.82%</text>
</g>
<text x="100" y="242" style="text-anchor:start">BenchmarkGet</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="248" width="132" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="749" y="263" style="text-anchor:start">-44.06%</text>
</g>
<text x="100" y="268" style="text-anchor:start">BenchmarkIndex</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="274" width="156" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="773" y="289" style="text-anchor:start">-52.26%</text>
</g>
<text x="100" y="294" style="text-anchor:start">BenchmarkIndexSelector</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="300" width="27" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="644" y="315" style="text-anchor:start">-9.32%</text>
</g>
<text x="100" y="320" style="text-anchor:start">BenchmarkIndexOfNode</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="326" width="7" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="624" y="341" style="text-anchor:start">-2.48%</text>
</g>
<text x="100" y="346" style="text-anchor:start">BenchmarkIndexOfSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="352" width="104" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="721" y="367" style="text-anchor:start">-34.96%</text>
</g>
<text x="100" y="372" style="text-anchor:start">BenchmarkMetalReviewExample</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="378" width="177" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="794" y="393" style="text-anchor:start">-59.16%</text>
</g>
<text x="100" y="398" style="text-anchor:start">BenchmarkAdd</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="404" width="0" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="617" y="419" style="text-anchor:start">+0.00%</text>
</g>
<text x="100" y="424" style="text-anchor:start">BenchmarkAddSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="602" y="430" width="10" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="597" y="445" style="text-anchor:end">+3.47%</text>
</g>
<text x="100" y="450" style="text-anchor:start">BenchmarkAddNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="456" width="7" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="624" y="471" style="text-anchor:start">-2.51%</text>
</g>
<text x="100" y="476" style="text-anchor:start">BenchmarkAndSelf</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="482" width="41" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="658" y="497" style="text-anchor:start">-13.96%</text>
</g>
<text x="100" y="502" style="text-anchor:start">BenchmarkFilter</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="508" width="43" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="660" y="523" style="text-anchor:start">-14.53%</text>
</g>
<text x="100" y="528" style="text-anchor:start">BenchmarkNot</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="534" width="11" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="628" y="549" style="text-anchor:start">-3.81%</text>
</g>
<text x="100" y="554" style="text-anchor:start">BenchmarkFilterFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="560" width="8" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="625" y="575" style="text-anchor:start">-2.83%</text>
</g>
<text x="100" y="580" style="text-anchor:start">BenchmarkNotFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="586" width="13" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="630" y="601" style="text-anchor:start">-4.63%</text>
</g>
<text x="100" y="606" style="text-anchor:start">BenchmarkFilterNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="612" width="6" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="623" y="627" style="text-anchor:start">-2.32%</text>
</g>
<text x="100" y="632" style="text-anchor:start">BenchmarkNotNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="638" width="12" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="629" y="653" style="text-anchor:start">-4.23%</text>
</g>
<text x="100" y="658" style="text-anchor:start">BenchmarkFilterSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="664" width="9" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="626" y="679" style="text-anchor:start">-3.31%</text>
</g>
<text x="100" y="684" style="text-anchor:start">BenchmarkNotSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="690" width="101" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="718" y="705" style="text-anchor:start">-33.69%</text>
</g>
<text x="100" y="710" style="text-anchor:start">BenchmarkHas</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="716" width="13" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="630" y="731" style="text-anchor:start">-4.53%</text>
</g>
<text x="100" y="736" style="text-anchor:start">BenchmarkHasNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="742" width="15" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="632" y="757" style="text-anchor:start">-5.30%</text>
</g>
<text x="100" y="762" style="text-anchor:start">BenchmarkHasSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="578" y="768" width="34" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="573" y="783" style="text-anchor:end">+11.35%</text>
</g>
<text x="100" y="788" style="text-anchor:start">BenchmarkEnd</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="794" width="9" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="626" y="809" style="text-anchor:start">-3.33%</text>
</g>
<text x="100" y="814" style="text-anchor:start">BenchmarkEach</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="820" width="27" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="644" y="835" style="text-anchor:start">-9.16%</text>
</g>
<text x="100" y="840" style="text-anchor:start">BenchmarkMap</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="846" width="57" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="674" y="861" style="text-anchor:start">-19.15%</text>
</g>
<text x="100" y="866" style="text-anchor:start">BenchmarkAttr</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="872" width="9" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="626" y="887" style="text-anchor:start">-3.24%</text>
</g>
<text x="100" y="892" style="text-anchor:start">BenchmarkText</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="898" width="183" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="800" y="913" style="text-anchor:start">-61.25%</text>
</g>
<text x="100" y="918" style="text-anchor:start">BenchmarkLength</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="924" width="35" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="652" y="939" style="text-anchor:start">-11.92%</text>
</g>
<text x="100" y="944" style="text-anchor:start">BenchmarkHtml</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="950" width="49" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="666" y="965" style="text-anchor:start">-16.46%</text>
</g>
<text x="100" y="970" style="text-anchor:start">BenchmarkIs</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="976" width="81" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="698" y="991" style="text-anchor:start">-27.31%</text>
</g>
<text x="100" y="996" style="text-anchor:start">BenchmarkIsPositional</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1002" width="40" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="657" y="1017" style="text-anchor:start">-13.49%</text>
</g>
<text x="100" y="1022" style="text-anchor:start">BenchmarkIsFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1028" width="5" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="622" y="1043" style="text-anchor:start">-1.71%</text>
</g>
<text x="100" y="1048" style="text-anchor:start">BenchmarkIsSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1054" width="9" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="626" y="1069" style="text-anchor:start">-3.03%</text>
</g>
<text x="100" y="1074" style="text-anchor:start">BenchmarkIsNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1080" width="60" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="677" y="1095" style="text-anchor:start">-20.30%</text>
</g>
<text x="100" y="1100" style="text-anchor:start">BenchmarkHasClass</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1106" width="33" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="650" y="1121" style="text-anchor:start">-11.29%</text>
</g>
<text x="100" y="1126" style="text-anchor:start">BenchmarkContains</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1132" width="152" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="769" y="1147" style="text-anchor:start">-50.88%</text>
</g>
<text x="100" y="1152" style="text-anchor:start">BenchmarkFind</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1158" width="135" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="752" y="1173" style="text-anchor:start">-45.28%</text>
</g>
<text x="100" y="1178" style="text-anchor:start">BenchmarkFindWithinSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="544" y="1184" width="68" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="539" y="1199" style="text-anchor:end">+22.95%</text>
</g>
<text x="100" y="1204" style="text-anchor:start">BenchmarkFindSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="544" y="1210" width="68" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="539" y="1225" style="text-anchor:end">+22.68%</text>
</g>
<text x="100" y="1230" style="text-anchor:start">BenchmarkFindNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1236" width="195" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="812" y="1251" style="text-anchor:start">-65.08%</text>
</g>
<text x="100" y="1256" style="text-anchor:start">BenchmarkContents</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1262" width="179" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="796" y="1277" style="text-anchor:start">-59.77%</text>
</g>
<text x="100" y="1282" style="text-anchor:start">BenchmarkContentsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1288" width="192" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="809" y="1303" style="text-anchor:start">-64.31%</text>
</g>
<text x="100" y="1308" style="text-anchor:start">BenchmarkChildren</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1314" width="118" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="735" y="1329" style="text-anchor:start">-39.56%</text>
</g>
<text x="100" y="1334" style="text-anchor:start">BenchmarkChildrenFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1340" width="19" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="636" y="1355" style="text-anchor:start">-6.61%</text>
</g>
<text x="100" y="1360" style="text-anchor:start">BenchmarkParent</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1366" width="32" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="649" y="1381" style="text-anchor:start">-10.92%</text>
</g>
<text x="100" y="1386" style="text-anchor:start">BenchmarkParentFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1392" width="5" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="622" y="1407" style="text-anchor:start">-1.72%</text>
</g>
<text x="100" y="1412" style="text-anchor:start">BenchmarkParents</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1418" width="7" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="624" y="1433" style="text-anchor:start">-2.37%</text>
</g>
<text x="100" y="1438" style="text-anchor:start">BenchmarkParentsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1444" width="142" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="759" y="1459" style="text-anchor:start">-47.60%</text>
</g>
<text x="100" y="1464" style="text-anchor:start">BenchmarkParentsUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1470" width="109" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="726" y="1485" style="text-anchor:start">-36.39%</text>
</g>
<text x="100" y="1490" style="text-anchor:start">BenchmarkParentsUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1496" width="107" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="724" y="1511" style="text-anchor:start">-35.99%</text>
</g>
<text x="100" y="1516" style="text-anchor:start">BenchmarkParentsUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1522" width="146" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="763" y="1537" style="text-anchor:start">-48.84%</text>
</g>
<text x="100" y="1542" style="text-anchor:start">BenchmarkParentsFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1548" width="98" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="715" y="1563" style="text-anchor:start">-32.75%</text>
</g>
<text x="100" y="1568" style="text-anchor:start">BenchmarkParentsFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1574" width="99" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="716" y="1589" style="text-anchor:start">-33.12%</text>
</g>
<text x="100" y="1594" style="text-anchor:start">BenchmarkParentsFilteredUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1600" width="89" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="706" y="1615" style="text-anchor:start">-29.78%</text>
</g>
<text x="100" y="1620" style="text-anchor:start">BenchmarkSiblings</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1626" width="92" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="709" y="1641" style="text-anchor:start">-30.89%</text>
</g>
<text x="100" y="1646" style="text-anchor:start">BenchmarkSiblingsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1652" width="204" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="821" y="1667" style="text-anchor:start">-68.19%</text>
</g>
<text x="100" y="1672" style="text-anchor:start">BenchmarkNext</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1678" width="199" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="816" y="1693" style="text-anchor:start">-66.59%</text>
</g>
<text x="100" y="1698" style="text-anchor:start">BenchmarkNextFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1704" width="93" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="710" y="1719" style="text-anchor:start">-31.08%</text>
</g>
<text x="100" y="1724" style="text-anchor:start">BenchmarkNextAll</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1730" width="90" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="707" y="1745" style="text-anchor:start">-30.03%</text>
</g>
<text x="100" y="1750" style="text-anchor:start">BenchmarkNextAllFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1756" width="204" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="821" y="1771" style="text-anchor:start">-68.32%</text>
</g>
<text x="100" y="1776" style="text-anchor:start">BenchmarkPrev</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1782" width="199" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="816" y="1797" style="text-anchor:start">-66.65%</text>
</g>
<text x="100" y="1802" style="text-anchor:start">BenchmarkPrevFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1808" width="129" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="746" y="1823" style="text-anchor:start">-43.33%</text>
</g>
<text x="100" y="1828" style="text-anchor:start">BenchmarkPrevAll</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1834" width="129" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="746" y="1849" style="text-anchor:start">-43.24%</text>
</g>
<text x="100" y="1854" style="text-anchor:start">BenchmarkPrevAllFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1860" width="162" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="779" y="1875" style="text-anchor:start">-54.27%</text>
</g>
<text x="100" y="1880" style="text-anchor:start">BenchmarkNextUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1886" width="113" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="730" y="1901" style="text-anchor:start">-37.90%</text>
</g>
<text x="100" y="1906" style="text-anchor:start">BenchmarkNextUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1912" width="129" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="746" y="1927" style="text-anchor:start">-43.21%</text>
</g>
<text x="100" y="1932" style="text-anchor:start">BenchmarkNextUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1938" width="147" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="764" y="1953" style="text-anchor:start">-49.33%</text>
</g>
<text x="100" y="1958" style="text-anchor:start">BenchmarkPrevUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1964" width="111" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="728" y="1979" style="text-anchor:start">-37.02%</text>
</g>
<text x="100" y="1984" style="text-anchor:start">BenchmarkPrevUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1990" width="133" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="750" y="2005" style="text-anchor:start">-44.59%</text>
</g>
<text x="100" y="2010" style="text-anchor:start">BenchmarkPrevUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2016" width="173" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="790" y="2031" style="text-anchor:start">-57.79%</text>
</g>
<text x="100" y="2036" style="text-anchor:start">BenchmarkNextFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2042" width="109" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="726" y="2057" style="text-anchor:start">-36.61%</text>
</g>
<text x="100" y="2062" style="text-anchor:start">BenchmarkNextFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2068" width="113" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="730" y="2083" style="text-anchor:start">-37.81%</text>
</g>
<text x="100" y="2088" style="text-anchor:start">BenchmarkNextFilteredUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2094" width="177" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="794" y="2109" style="text-anchor:start">-59.21%</text>
</g>
<text x="100" y="2114" style="text-anchor:start">BenchmarkPrevFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2120" width="108" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="725" y="2135" style="text-anchor:start">-36.20%</text>
</g>
<text x="100" y="2140" style="text-anchor:start">BenchmarkPrevFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2146" width="108" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="725" y="2161" style="text-anchor:start">-36.05%</text>
</g>
<text x="100" y="2166" style="text-anchor:start">BenchmarkPrevFilteredUntilNodes</text>
</g>
</svg>

459
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.0

@ -1,459 +0,0 @@
PASS
BenchmarkFirst 20000000 94.3 ns/op
BenchmarkLast 20000000 94.7 ns/op
BenchmarkEq 20000000 93.7 ns/op
BenchmarkSlice 20000000 89.9 ns/op
BenchmarkGet 1000000000 2.72 ns/op
BenchmarkIndex 1000000 1834 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 50000 53958 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 10.1 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 10.9 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 5000 326712 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 50000 51776 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 196 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 191 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2495 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 50000 30974 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 50000 35322 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 65644 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 69245 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 64824 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 20000 76247 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 66154 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 20000 76336 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 569495 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 227059 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 227167 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 3.99 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 9354 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 16557 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkAttr 50000000 36.4 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 100000 18473 ns/op
BenchmarkLength 2000000000 0.76 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 666 ns/op
BenchmarkIs 50000 35174 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 50000 31814 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2754 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 66260 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 64682 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 672953 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.3 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 50000 53780 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 10000 125963 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 357318 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 357587 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 200000 9135 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 200000 12383 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 1000000 1809 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 5814 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 44810 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 48795 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 89102 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 93953 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 10000 130783 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 231797 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 233761 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 50000 31360 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 50000 30272 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 50000 30327 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 20000 89862 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 20000 97948 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 50000 31975 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 50000 34887 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 60734 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 67428 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 50000 32399 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 50000 34944 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 29360 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 50000 32291 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 10000 191890 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 20000 92054 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 50000 43401 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 5000 433383 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 10000 116423 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 50000 35338 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 10000 104686 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 20000 99485 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 20000 99452 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 10000 112640 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 10000 103702 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 10000 103277 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 6530 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 1000000 1135 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 1000000 1133 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 192.541s

420
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.0-v0.2.1-go1.1rc1.svg

@ -1,420 +0,0 @@
<?xml version="1.0"?>
<!-- Generated by SVGo -->
<svg width="1024" height="768"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g style="font-size:20px;font-family:sans-serif">
<rect x="0" y="0" width="1024" height="768" style="fill:white"/>
<text x="100" y="50" style="font-size:150%"></text>
<g style="font-style:italic;font-size:75%">
<rect x="606" y="118" width="6" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="601" y="133" style="text-anchor:end">+2.12%</text>
</g>
<text x="100" y="138" style="text-anchor:start">BenchmarkFirst</text>
<g style="font-style:italic;font-size:75%">
<rect x="609" y="144" width="3" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="604" y="159" style="text-anchor:end">+1.06%</text>
</g>
<text x="100" y="164" style="text-anchor:start">BenchmarkLast</text>
<g style="font-style:italic;font-size:75%">
<rect x="602" y="170" width="10" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="597" y="185" style="text-anchor:end">+3.63%</text>
</g>
<text x="100" y="190" style="text-anchor:start">BenchmarkEq</text>
<g style="font-style:italic;font-size:75%">
<rect x="604" y="196" width="8" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="599" y="211" style="text-anchor:end">+2.67%</text>
</g>
<text x="100" y="216" style="text-anchor:start">BenchmarkSlice</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="222" width="72" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="689" y="237" style="text-anchor:start">-24.26%</text>
</g>
<text x="100" y="242" style="text-anchor:start">BenchmarkGet</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="248" width="125" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="742" y="263" style="text-anchor:start">-41.71%</text>
</g>
<text x="100" y="268" style="text-anchor:start">BenchmarkIndex</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="274" width="151" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="768" y="289" style="text-anchor:start">-50.42%</text>
</g>
<text x="100" y="294" style="text-anchor:start">BenchmarkIndexSelector</text>
<g style="font-style:italic;font-size:75%">
<rect x="595" y="300" width="17" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="590" y="315" style="text-anchor:end">+5.94%</text>
</g>
<text x="100" y="320" style="text-anchor:start">BenchmarkIndexOfNode</text>
<g style="font-style:italic;font-size:75%">
<rect x="588" y="326" width="24" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="583" y="341" style="text-anchor:end">+8.26%</text>
</g>
<text x="100" y="346" style="text-anchor:start">BenchmarkIndexOfSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="352" width="98" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="715" y="367" style="text-anchor:start">-32.94%</text>
</g>
<text x="100" y="372" style="text-anchor:start">BenchmarkMetalReviewExample</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="378" width="170" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="787" y="393" style="text-anchor:start">-56.84%</text>
</g>
<text x="100" y="398" style="text-anchor:start">BenchmarkAdd</text>
<g style="font-style:italic;font-size:75%">
<rect x="593" y="404" width="19" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="588" y="419" style="text-anchor:end">+6.63%</text>
</g>
<text x="100" y="424" style="text-anchor:start">BenchmarkAddSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="584" y="430" width="28" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="579" y="445" style="text-anchor:end">+9.42%</text>
</g>
<text x="100" y="450" style="text-anchor:start">BenchmarkAddNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="604" y="456" width="8" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="599" y="471" style="text-anchor:end">+2.93%</text>
</g>
<text x="100" y="476" style="text-anchor:start">BenchmarkAndSelf</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="482" width="41" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="658" y="497" style="text-anchor:start">-13.75%</text>
</g>
<text x="100" y="502" style="text-anchor:start">BenchmarkFilter</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="508" width="44" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="661" y="523" style="text-anchor:start">-14.90%</text>
</g>
<text x="100" y="528" style="text-anchor:start">BenchmarkNot</text>
<g style="font-style:italic;font-size:75%">
<rect x="609" y="534" width="3" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="604" y="549" style="text-anchor:end">+1.07%</text>
</g>
<text x="100" y="554" style="text-anchor:start">BenchmarkFilterFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="598" y="560" width="14" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="593" y="575" style="text-anchor:end">+4.91%</text>
</g>
<text x="100" y="580" style="text-anchor:start">BenchmarkNotFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="609" y="586" width="3" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="604" y="601" style="text-anchor:end">+1.03%</text>
</g>
<text x="100" y="606" style="text-anchor:start">BenchmarkFilterNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="600" y="612" width="12" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="595" y="627" style="text-anchor:end">+4.22%</text>
</g>
<text x="100" y="632" style="text-anchor:start">BenchmarkNotNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="638" width="3" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="620" y="653" style="text-anchor:start">-1.00%</text>
</g>
<text x="100" y="658" style="text-anchor:start">BenchmarkFilterSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="600" y="664" width="12" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="595" y="679" style="text-anchor:end">+4.00%</text>
</g>
<text x="100" y="684" style="text-anchor:start">BenchmarkNotSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="690" width="96" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="713" y="705" style="text-anchor:start">-32.12%</text>
</g>
<text x="100" y="710" style="text-anchor:start">BenchmarkHas</text>
<g style="font-style:italic;font-size:75%">
<rect x="608" y="716" width="4" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="603" y="731" style="text-anchor:end">+1.59%</text>
</g>
<text x="100" y="736" style="text-anchor:start">BenchmarkHasNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="608" y="742" width="4" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="603" y="757" style="text-anchor:end">+1.56%</text>
</g>
<text x="100" y="762" style="text-anchor:start">BenchmarkHasSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="566" y="768" width="46" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="561" y="783" style="text-anchor:end">+15.54%</text>
</g>
<text x="100" y="788" style="text-anchor:start">BenchmarkEnd</text>
<g style="font-style:italic;font-size:75%">
<rect x="607" y="794" width="5" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="602" y="809" style="text-anchor:end">+1.77%</text>
</g>
<text x="100" y="814" style="text-anchor:start">BenchmarkEach</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="820" width="10" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="627" y="835" style="text-anchor:start">-3.61%</text>
</g>
<text x="100" y="840" style="text-anchor:start">BenchmarkMap</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="846" width="49" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="666" y="861" style="text-anchor:start">-16.48%</text>
</g>
<text x="100" y="866" style="text-anchor:start">BenchmarkAttr</text>
<g style="font-style:italic;font-size:75%">
<rect x="609" y="872" width="3" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="604" y="887" style="text-anchor:end">+1.33%</text>
</g>
<text x="100" y="892" style="text-anchor:start">BenchmarkText</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="898" width="177" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="794" y="913" style="text-anchor:start">-59.21%</text>
</g>
<text x="100" y="918" style="text-anchor:start">BenchmarkLength</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="924" width="27" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="644" y="939" style="text-anchor:start">-9.01%</text>
</g>
<text x="100" y="944" style="text-anchor:start">BenchmarkHtml</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="950" width="50" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="667" y="965" style="text-anchor:start">-16.73%</text>
</g>
<text x="100" y="970" style="text-anchor:start">BenchmarkIs</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="976" width="75" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="692" y="991" style="text-anchor:start">-25.08%</text>
</g>
<text x="100" y="996" style="text-anchor:start">BenchmarkIsPositional</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1002" width="34" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="651" y="1017" style="text-anchor:start">-11.55%</text>
</g>
<text x="100" y="1022" style="text-anchor:start">BenchmarkIsFunction</text>
<g style="font-style:italic;font-size:75%">
<rect x="609" y="1028" width="3" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="604" y="1043" style="text-anchor:end">+1.28%</text>
</g>
<text x="100" y="1048" style="text-anchor:start">BenchmarkIsSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="606" y="1054" width="6" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="601" y="1069" style="text-anchor:end">+2.10%</text>
</g>
<text x="100" y="1074" style="text-anchor:start">BenchmarkIsNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1080" width="47" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="664" y="1095" style="text-anchor:start">-15.99%</text>
</g>
<text x="100" y="1100" style="text-anchor:start">BenchmarkHasClass</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1106" width="7" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="624" y="1121" style="text-anchor:start">-2.65%</text>
</g>
<text x="100" y="1126" style="text-anchor:start">BenchmarkContains</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1132" width="145" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="762" y="1147" style="text-anchor:start">-48.54%</text>
</g>
<text x="100" y="1152" style="text-anchor:start">BenchmarkFind</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1158" width="128" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="745" y="1173" style="text-anchor:start">-42.71%</text>
</g>
<text x="100" y="1178" style="text-anchor:start">BenchmarkFindWithinSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="526" y="1184" width="86" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="521" y="1199" style="text-anchor:end">+28.77%</text>
</g>
<text x="100" y="1204" style="text-anchor:start">BenchmarkFindSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="527" y="1210" width="85" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="522" y="1225" style="text-anchor:end">+28.47%</text>
</g>
<text x="100" y="1230" style="text-anchor:start">BenchmarkFindNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1236" width="188" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="805" y="1251" style="text-anchor:start">-62.84%</text>
</g>
<text x="100" y="1256" style="text-anchor:start">BenchmarkContents</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1262" width="174" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="791" y="1277" style="text-anchor:start">-58.06%</text>
</g>
<text x="100" y="1282" style="text-anchor:start">BenchmarkContentsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1288" width="189" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="806" y="1303" style="text-anchor:start">-63.13%</text>
</g>
<text x="100" y="1308" style="text-anchor:start">BenchmarkChildren</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1314" width="114" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="731" y="1329" style="text-anchor:start">-38.24%</text>
</g>
<text x="100" y="1334" style="text-anchor:start">BenchmarkChildrenFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1340" width="10" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="627" y="1355" style="text-anchor:start">-3.66%</text>
</g>
<text x="100" y="1360" style="text-anchor:start">BenchmarkParent</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1366" width="18" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="635" y="1381" style="text-anchor:start">-6.06%</text>
</g>
<text x="100" y="1386" style="text-anchor:start">BenchmarkParentFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="602" y="1392" width="10" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="597" y="1407" style="text-anchor:end">+3.64%</text>
</g>
<text x="100" y="1412" style="text-anchor:start">BenchmarkParents</text>
<g style="font-style:italic;font-size:75%">
<rect x="608" y="1418" width="4" height="20" style="fill-opacity:0.3;fill:red"/>
<text x="603" y="1433" style="text-anchor:end">+1.44%</text>
</g>
<text x="100" y="1438" style="text-anchor:start">BenchmarkParentsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1444" width="133" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="750" y="1459" style="text-anchor:start">-44.35%</text>
</g>
<text x="100" y="1464" style="text-anchor:start">BenchmarkParentsUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1470" width="95" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="712" y="1485" style="text-anchor:start">-31.99%</text>
</g>
<text x="100" y="1490" style="text-anchor:start">BenchmarkParentsUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1496" width="97" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="714" y="1511" style="text-anchor:start">-32.62%</text>
</g>
<text x="100" y="1516" style="text-anchor:start">BenchmarkParentsUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1522" width="137" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="754" y="1537" style="text-anchor:start">-45.83%</text>
</g>
<text x="100" y="1542" style="text-anchor:start">BenchmarkParentsFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1548" width="90" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="707" y="1563" style="text-anchor:start">-30.05%</text>
</g>
<text x="100" y="1568" style="text-anchor:start">BenchmarkParentsFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1574" width="89" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="706" y="1589" style="text-anchor:start">-29.97%</text>
</g>
<text x="100" y="1594" style="text-anchor:start">BenchmarkParentsFilteredUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1600" width="77" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="694" y="1615" style="text-anchor:start">-25.96%</text>
</g>
<text x="100" y="1620" style="text-anchor:start">BenchmarkSiblings</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1626" width="80" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="697" y="1641" style="text-anchor:start">-26.67%</text>
</g>
<text x="100" y="1646" style="text-anchor:start">BenchmarkSiblingsFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1652" width="199" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="816" y="1667" style="text-anchor:start">-66.40%</text>
</g>
<text x="100" y="1672" style="text-anchor:start">BenchmarkNext</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1678" width="193" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="810" y="1693" style="text-anchor:start">-64.46%</text>
</g>
<text x="100" y="1698" style="text-anchor:start">BenchmarkNextFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1704" width="79" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="696" y="1719" style="text-anchor:start">-26.50%</text>
</g>
<text x="100" y="1724" style="text-anchor:start">BenchmarkNextAll</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1730" width="78" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="695" y="1745" style="text-anchor:start">-26.27%</text>
</g>
<text x="100" y="1750" style="text-anchor:start">BenchmarkNextAllFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1756" width="200" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="817" y="1771" style="text-anchor:start">-66.84%</text>
</g>
<text x="100" y="1776" style="text-anchor:start">BenchmarkPrev</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1782" width="193" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="810" y="1797" style="text-anchor:start">-64.35%</text>
</g>
<text x="100" y="1802" style="text-anchor:start">BenchmarkPrevFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1808" width="120" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="737" y="1823" style="text-anchor:start">-40.05%</text>
</g>
<text x="100" y="1828" style="text-anchor:start">BenchmarkPrevAll</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1834" width="119" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="736" y="1849" style="text-anchor:start">-39.74%</text>
</g>
<text x="100" y="1854" style="text-anchor:start">BenchmarkPrevAllFiltered</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1860" width="155" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="772" y="1875" style="text-anchor:start">-51.73%</text>
</g>
<text x="100" y="1880" style="text-anchor:start">BenchmarkNextUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1886" width="100" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="717" y="1901" style="text-anchor:start">-33.42%</text>
</g>
<text x="100" y="1906" style="text-anchor:start">BenchmarkNextUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1912" width="121" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="738" y="1927" style="text-anchor:start">-40.42%</text>
</g>
<text x="100" y="1932" style="text-anchor:start">BenchmarkNextUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1938" width="140" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="757" y="1953" style="text-anchor:start">-46.87%</text>
</g>
<text x="100" y="1958" style="text-anchor:start">BenchmarkPrevUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1964" width="99" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="716" y="1979" style="text-anchor:start">-33.14%</text>
</g>
<text x="100" y="1984" style="text-anchor:start">BenchmarkPrevUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="1990" width="123" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="740" y="2005" style="text-anchor:start">-41.19%</text>
</g>
<text x="100" y="2010" style="text-anchor:start">BenchmarkPrevUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2016" width="167" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="784" y="2031" style="text-anchor:start">-55.92%</text>
</g>
<text x="100" y="2036" style="text-anchor:start">BenchmarkNextFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2042" width="97" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="714" y="2057" style="text-anchor:start">-32.49%</text>
</g>
<text x="100" y="2062" style="text-anchor:start">BenchmarkNextFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2068" width="99" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="716" y="2083" style="text-anchor:start">-33.00%</text>
</g>
<text x="100" y="2088" style="text-anchor:start">BenchmarkNextFilteredUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2094" width="175" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="792" y="2109" style="text-anchor:start">-58.54%</text>
</g>
<text x="100" y="2114" style="text-anchor:start">BenchmarkPrevFilteredUntil</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2120" width="101" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="718" y="2135" style="text-anchor:start">-33.80%</text>
</g>
<text x="100" y="2140" style="text-anchor:start">BenchmarkPrevFilteredUntilSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2146" width="100" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="717" y="2161" style="text-anchor:start">-33.44%</text>
</g>
<text x="100" y="2166" style="text-anchor:start">BenchmarkPrevFilteredUntilNodes</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2172" width="74" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="691" y="2187" style="text-anchor:start">-24.82%</text>
</g>
<text x="100" y="2192" style="text-anchor:start">BenchmarkClosest</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2198" width="103" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="720" y="2213" style="text-anchor:start">-34.45%</text>
</g>
<text x="100" y="2218" style="text-anchor:start">BenchmarkClosestSelection</text>
<g style="font-style:italic;font-size:75%">
<rect x="612" y="2224" width="105" height="20" style="fill-opacity:0.3;fill:green"/>
<text x="722" y="2239" style="text-anchor:start">-35.30%</text>
</g>
<text x="100" y="2244" style="text-anchor:start">BenchmarkClosestNodes</text>
</g>
</svg>

470
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.2.1-go1.1rc1

@ -1,470 +0,0 @@
PASS
BenchmarkFirst 20000000 96.3 ns/op
BenchmarkLast 20000000 95.7 ns/op
BenchmarkEq 20000000 97.1 ns/op
BenchmarkSlice 20000000 92.3 ns/op
BenchmarkGet 1000000000 2.06 ns/op
BenchmarkIndex 1000000 1069 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 100000 26750 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 10.7 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 11.8 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 10000 219078 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 100000 22345 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 209 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 209 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2568 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 100000 26715 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 50000 30058 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 66346 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 72646 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 65493 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 20000 79466 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 65494 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 20000 79387 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 386571 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 230664 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 230705 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.61 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 9520 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 15960 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkAttr 50000000 30.4 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 100000 18718 ns/op
BenchmarkLength 2000000000 0.31 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 606 ns/op
BenchmarkIs 100000 29289 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 100000 23834 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2436 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 67106 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 66042 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 565347 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.0 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 100000 27677 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 50000 72162 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 460124 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 459390 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 500000 3395 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 500000 5193 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 5000000 667 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 3591 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 43168 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 45836 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 92348 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 95306 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 50000 72782 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 157639 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 157510 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 100000 16987 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 100000 21174 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 100000 21238 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 50000 66536 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 50000 71822 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 200000 10745 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 200000 12399 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 44640 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 49713 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 200000 10743 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 200000 12456 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 17600 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 100000 19460 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 20000 92630 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 50000 61285 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 100000 25859 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 10000 230236 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 20000 77837 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 100000 20784 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 50000 46147 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 50000 67164 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 50000 66628 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 50000 46697 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 50000 68646 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 50000 68745 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 4909 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 5000000 744 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 5000000 733 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 220.793s

476
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.0

@ -1,476 +0,0 @@
PASS
BenchmarkFirst 20000000 95.5 ns/op
BenchmarkLast 20000000 94.9 ns/op
BenchmarkEq 20000000 95.7 ns/op
BenchmarkSlice 20000000 91.7 ns/op
BenchmarkGet 1000000000 2.05 ns/op
BenchmarkIndex 1000000 1079 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 100000 26972 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 10.8 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 11.7 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 10000 213800 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 100000 21811 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 205 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 202 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2467 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 100000 25643 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 100000 29566 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 66894 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 72183 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 65516 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 20000 78880 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 65232 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 20000 78813 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 388834 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 228552 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 228365 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.62 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 9548 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 15900 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkEachWithBreak 1000000 1650 ns/op
--- BENCH: BenchmarkEachWithBreak
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
BenchmarkAttr 50000000 30.5 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 100000 18873 ns/op
BenchmarkLength 2000000000 0.31 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 616 ns/op
BenchmarkIs 100000 29499 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 100000 23733 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2404 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 65376 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 65322 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 558933 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.1 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 100000 27841 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 50000 72096 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 457349 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 459324 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 500000 3435 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 500000 5241 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 5000000 667 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 3639 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 44867 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 46476 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 92559 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 96142 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 50000 73931 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 159820 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 158811 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 100000 17203 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 100000 21358 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 100000 21338 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 50000 66463 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 50000 72503 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 200000 10881 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 200000 12588 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 45075 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 50455 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 200000 10933 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 200000 12579 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 17751 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 100000 19702 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 20000 93586 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 50000 61155 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 100000 25805 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 10000 232225 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 20000 78316 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 100000 20657 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 50000 46567 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 50000 67227 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 50000 66995 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 50000 47361 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 50000 68802 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 50000 68928 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 4922 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 5000000 738 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 5000000 737 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 224.003s

478
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2

@ -1,478 +0,0 @@
PASS
BenchmarkFirst 20000000 88.4 ns/op
BenchmarkLast 20000000 88.2 ns/op
BenchmarkEq 20000000 87.4 ns/op
BenchmarkSlice 20000000 84.9 ns/op
BenchmarkGet 2000000000 1.99 ns/op
BenchmarkIndex 2000000 906 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 100000 22276 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 200000000 9.72 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 10.4 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 10000 199277 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 100000 18277 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 200 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 189 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2569 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 100000 25195 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 100000 29003 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 60690 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 66008 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 59723 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 50000 72698 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 59598 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 50000 72526 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 367076 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 219710 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 219105 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.58 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 8615 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 200000 14271 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkEachWithBreak 1000000 1497 ns/op
--- BENCH: BenchmarkEachWithBreak
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
BenchmarkAttr 50000000 30.9 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 200000 13729 ns/op
BenchmarkLength 2000000000 0.31 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 537 ns/op
BenchmarkIs 100000 28904 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 100000 23556 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2195 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 60100 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 59962 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 388679 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.0 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 100000 22779 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 50000 62033 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 446918 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 441753 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 1000000 2807 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 500000 4477 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 5000000 548 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 3304 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 38248 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 40677 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 83043 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 85391 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 50000 65118 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 144028 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 146713 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 100000 15113 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 100000 18881 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 100000 18926 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 50000 63221 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 50000 69028 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 200000 9133 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 200000 10601 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 43089 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 47867 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 200000 9104 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 200000 10579 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 15185 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 100000 17108 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 20000 81087 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 50000 55831 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 100000 23130 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 10000 204673 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 50000 70965 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 100000 18591 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 50000 42004 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 50000 61953 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 50000 62124 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 50000 42861 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 50000 62451 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 50000 62631 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 4684 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 5000000 622 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 5000000 617 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 218.724s

477
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2-take2

@ -1,477 +0,0 @@
PASS
BenchmarkFirst 20000000 88.3 ns/op
BenchmarkLast 20000000 88.9 ns/op
BenchmarkEq 20000000 86.7 ns/op
BenchmarkSlice 20000000 84.1 ns/op
BenchmarkGet 2000000000 1.99 ns/op
BenchmarkIndex 2000000 907 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 200000 13052 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 10.5 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 11.6 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 10000 189556 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 200000 13714 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 200 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 186 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2532 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 100000 25199 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 100000 29162 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 60733 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 66124 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 59489 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 50000 73623 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 60053 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 50000 73477 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 364859 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 226980 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 220471 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.64 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 8811 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 100000 15365 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkEachWithBreak 1000000 1559 ns/op
--- BENCH: BenchmarkEachWithBreak
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
BenchmarkAttr 50000000 31.7 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 200000 13901 ns/op
BenchmarkLength 2000000000 0.31 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 541 ns/op
BenchmarkIs 100000 29435 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 100000 22938 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2185 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 60607 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 61599 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 395436 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.0 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 200000 13788 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 50000 54253 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 438879 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 437225 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 1000000 2844 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 500000 4528 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 5000000 552 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 3345 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 39482 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 42113 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 84136 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 86041 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 50000 65844 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 146903 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 146638 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 100000 16413 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 100000 20366 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 100000 18800 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 50000 63443 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 50000 69250 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 200000 9193 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 200000 10767 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 42829 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 48174 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 200000 9114 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 200000 11114 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 16387 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 100000 18322 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 20000 83828 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 50000 58822 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 100000 23173 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 10000 219407 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 20000 76033 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 100000 19417 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 50000 44648 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 50000 62751 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 50000 62035 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 50000 43331 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 50000 64767 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 50000 67808 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 4870 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 5000000 656 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 5000000 663 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 218.007s

477
vendor/src/github.com/PuerkitoBio/goquery/bench/v0.3.2-go1.2rc1

@ -1,477 +0,0 @@
PASS
BenchmarkFirst 20000000 91.0 ns/op
BenchmarkLast 20000000 90.5 ns/op
BenchmarkEq 20000000 90.2 ns/op
BenchmarkSlice 20000000 88.0 ns/op
BenchmarkGet 1000000000 2.04 ns/op
BenchmarkIndex 2000000 935 ns/op
--- BENCH: BenchmarkIndex
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
bench_array_test.go:73: Index=3
BenchmarkIndexSelector 100000 23613 ns/op
--- BENCH: BenchmarkIndexSelector
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
bench_array_test.go:85: IndexSelector=4
BenchmarkIndexOfNode 100000000 10.2 ns/op
--- BENCH: BenchmarkIndexOfNode
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
bench_array_test.go:99: IndexOfNode=2
BenchmarkIndexOfSelection 100000000 11.0 ns/op
--- BENCH: BenchmarkIndexOfSelection
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
bench_array_test.go:111: IndexOfSelection=2
BenchmarkMetalReviewExample 10000 213843 ns/op
--- BENCH: BenchmarkMetalReviewExample
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
bench_example_test.go:41: MetalReviewExample=10
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5).
Review 1: Over Your Threshold - Facticity (6.0).
Review 2: Nuclear Death Terror - Chaos Reigns (7.5).
Review 3: Evoken - Atra Mors (9.5).
... [output truncated]
BenchmarkAdd 100000 18671 ns/op
--- BENCH: BenchmarkAdd
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
bench_expand_test.go:20: Add=43
BenchmarkAddSelection 10000000 204 ns/op
--- BENCH: BenchmarkAddSelection
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
bench_expand_test.go:37: AddSelection=43
BenchmarkAddNodes 10000000 195 ns/op
--- BENCH: BenchmarkAddNodes
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
bench_expand_test.go:55: AddNodes=43
BenchmarkAndSelf 1000000 2611 ns/op
--- BENCH: BenchmarkAndSelf
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
bench_expand_test.go:71: AndSelf=44
BenchmarkFilter 100000 27571 ns/op
--- BENCH: BenchmarkFilter
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
bench_filter_test.go:20: Filter=13
BenchmarkNot 50000 32006 ns/op
--- BENCH: BenchmarkNot
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
bench_filter_test.go:36: Not=371
BenchmarkFilterFunction 50000 61388 ns/op
--- BENCH: BenchmarkFilterFunction
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
bench_filter_test.go:55: FilterFunction=112
BenchmarkNotFunction 50000 66702 ns/op
--- BENCH: BenchmarkNotFunction
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
bench_filter_test.go:74: NotFunction=261
BenchmarkFilterNodes 50000 59699 ns/op
--- BENCH: BenchmarkFilterNodes
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
bench_filter_test.go:92: FilterNodes=2
BenchmarkNotNodes 50000 73248 ns/op
--- BENCH: BenchmarkNotNodes
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
bench_filter_test.go:110: NotNodes=360
BenchmarkFilterSelection 50000 59242 ns/op
--- BENCH: BenchmarkFilterSelection
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
bench_filter_test.go:127: FilterSelection=2
BenchmarkNotSelection 50000 73211 ns/op
--- BENCH: BenchmarkNotSelection
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
bench_filter_test.go:144: NotSelection=360
BenchmarkHas 5000 395087 ns/op
--- BENCH: BenchmarkHas
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
bench_filter_test.go:160: Has=13
BenchmarkHasNodes 10000 215849 ns/op
--- BENCH: BenchmarkHasNodes
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
bench_filter_test.go:178: HasNodes=15
BenchmarkHasSelection 10000 215612 ns/op
--- BENCH: BenchmarkHasSelection
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
bench_filter_test.go:195: HasSelection=15
BenchmarkEnd 500000000 4.59 ns/op
--- BENCH: BenchmarkEnd
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
bench_filter_test.go:211: End=373
BenchmarkEach 200000 8588 ns/op
--- BENCH: BenchmarkEach
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
bench_iteration_test.go:22: Each=59
BenchmarkMap 200000 14444 ns/op
--- BENCH: BenchmarkMap
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
bench_iteration_test.go:41: Map=59
BenchmarkEachWithBreak 1000000 1490 ns/op
--- BENCH: BenchmarkEachWithBreak
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
bench_iteration_test.go:61: Each=10
BenchmarkAttr 50000000 30.9 ns/op
--- BENCH: BenchmarkAttr
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
bench_property_test.go:16: Attr=firstHeading
BenchmarkText 200000 14017 ns/op
BenchmarkLength 2000000000 0.31 ns/op
--- BENCH: BenchmarkLength
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
bench_property_test.go:37: Length=14
BenchmarkHtml 5000000 577 ns/op
BenchmarkIs 50000 31936 ns/op
--- BENCH: BenchmarkIs
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
bench_query_test.go:16: Is=true
BenchmarkIsPositional 100000 23372 ns/op
--- BENCH: BenchmarkIsPositional
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
bench_query_test.go:28: IsPositional=true
BenchmarkIsFunction 1000000 2170 ns/op
--- BENCH: BenchmarkIsFunction
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
bench_query_test.go:43: IsFunction=true
BenchmarkIsSelection 50000 59814 ns/op
--- BENCH: BenchmarkIsSelection
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
bench_query_test.go:56: IsSelection=true
BenchmarkIsNodes 50000 59629 ns/op
--- BENCH: BenchmarkIsNodes
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
bench_query_test.go:70: IsNodes=true
BenchmarkHasClass 5000 384894 ns/op
--- BENCH: BenchmarkHasClass
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
bench_query_test.go:82: HasClass=true
BenchmarkContains 100000000 11.4 ns/op
--- BENCH: BenchmarkContains
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
bench_query_test.go:96: Contains=true
BenchmarkFind 100000 23545 ns/op
--- BENCH: BenchmarkFind
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
bench_traversal_test.go:18: Find=41
BenchmarkFindWithinSelection 50000 63775 ns/op
--- BENCH: BenchmarkFindWithinSelection
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
bench_traversal_test.go:34: FindWithinSelection=39
BenchmarkFindSelection 5000 441958 ns/op
--- BENCH: BenchmarkFindSelection
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
bench_traversal_test.go:51: FindSelection=73
BenchmarkFindNodes 5000 437717 ns/op
--- BENCH: BenchmarkFindNodes
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
bench_traversal_test.go:69: FindNodes=73
BenchmarkContents 1000000 2799 ns/op
--- BENCH: BenchmarkContents
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
bench_traversal_test.go:85: Contents=16
BenchmarkContentsFiltered 500000 4489 ns/op
--- BENCH: BenchmarkContentsFiltered
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
bench_traversal_test.go:101: ContentsFiltered=1
BenchmarkChildren 5000000 546 ns/op
--- BENCH: BenchmarkChildren
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
bench_traversal_test.go:117: Children=2
BenchmarkChildrenFiltered 500000 3472 ns/op
--- BENCH: BenchmarkChildrenFiltered
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
bench_traversal_test.go:133: ChildrenFiltered=2
BenchmarkParent 50000 39067 ns/op
--- BENCH: BenchmarkParent
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
bench_traversal_test.go:149: Parent=55
BenchmarkParentFiltered 50000 41450 ns/op
--- BENCH: BenchmarkParentFiltered
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
bench_traversal_test.go:165: ParentFiltered=4
BenchmarkParents 20000 84864 ns/op
--- BENCH: BenchmarkParents
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
bench_traversal_test.go:181: Parents=73
BenchmarkParentsFiltered 20000 87823 ns/op
--- BENCH: BenchmarkParentsFiltered
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
bench_traversal_test.go:197: ParentsFiltered=18
BenchmarkParentsUntil 50000 65986 ns/op
--- BENCH: BenchmarkParentsUntil
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
bench_traversal_test.go:213: ParentsUntil=52
BenchmarkParentsUntilSelection 10000 149798 ns/op
--- BENCH: BenchmarkParentsUntilSelection
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
bench_traversal_test.go:230: ParentsUntilSelection=70
BenchmarkParentsUntilNodes 10000 148144 ns/op
--- BENCH: BenchmarkParentsUntilNodes
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
bench_traversal_test.go:248: ParentsUntilNodes=70
BenchmarkParentsFilteredUntil 100000 15579 ns/op
--- BENCH: BenchmarkParentsFilteredUntil
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
bench_traversal_test.go:264: ParentsFilteredUntil=2
BenchmarkParentsFilteredUntilSelection 100000 19094 ns/op
--- BENCH: BenchmarkParentsFilteredUntilSelection
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2
BenchmarkParentsFilteredUntilNodes 100000 19037 ns/op
--- BENCH: BenchmarkParentsFilteredUntilNodes
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2
BenchmarkSiblings 50000 63891 ns/op
--- BENCH: BenchmarkSiblings
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
bench_traversal_test.go:315: Siblings=293
BenchmarkSiblingsFiltered 50000 70424 ns/op
--- BENCH: BenchmarkSiblingsFiltered
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
bench_traversal_test.go:331: SiblingsFiltered=46
BenchmarkNext 200000 9350 ns/op
--- BENCH: BenchmarkNext
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
bench_traversal_test.go:347: Next=49
BenchmarkNextFiltered 200000 10929 ns/op
--- BENCH: BenchmarkNextFiltered
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
bench_traversal_test.go:363: NextFiltered=6
BenchmarkNextAll 50000 43398 ns/op
--- BENCH: BenchmarkNextAll
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
bench_traversal_test.go:379: NextAll=234
BenchmarkNextAllFiltered 50000 48519 ns/op
--- BENCH: BenchmarkNextAllFiltered
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
bench_traversal_test.go:395: NextAllFiltered=33
BenchmarkPrev 200000 9181 ns/op
--- BENCH: BenchmarkPrev
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
bench_traversal_test.go:411: Prev=49
BenchmarkPrevFiltered 200000 10811 ns/op
--- BENCH: BenchmarkPrevFiltered
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
bench_traversal_test.go:429: PrevFiltered=7
BenchmarkPrevAll 100000 15589 ns/op
--- BENCH: BenchmarkPrevAll
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
bench_traversal_test.go:445: PrevAll=78
BenchmarkPrevAllFiltered 100000 17341 ns/op
--- BENCH: BenchmarkPrevAllFiltered
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
bench_traversal_test.go:461: PrevAllFiltered=6
BenchmarkNextUntil 20000 80663 ns/op
--- BENCH: BenchmarkNextUntil
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
bench_traversal_test.go:477: NextUntil=84
BenchmarkNextUntilSelection 50000 56496 ns/op
--- BENCH: BenchmarkNextUntilSelection
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
bench_traversal_test.go:494: NextUntilSelection=42
BenchmarkNextUntilNodes 100000 23729 ns/op
--- BENCH: BenchmarkNextUntilNodes
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
bench_traversal_test.go:512: NextUntilNodes=12
BenchmarkPrevUntil 10000 208267 ns/op
--- BENCH: BenchmarkPrevUntil
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
bench_traversal_test.go:528: PrevUntil=238
BenchmarkPrevUntilSelection 50000 72119 ns/op
--- BENCH: BenchmarkPrevUntilSelection
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
bench_traversal_test.go:545: PrevUntilSelection=49
BenchmarkPrevUntilNodes 100000 18549 ns/op
--- BENCH: BenchmarkPrevUntilNodes
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
bench_traversal_test.go:563: PrevUntilNodes=11
BenchmarkNextFilteredUntil 50000 42339 ns/op
--- BENCH: BenchmarkNextFilteredUntil
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
bench_traversal_test.go:579: NextFilteredUntil=22
BenchmarkNextFilteredUntilSelection 50000 61916 ns/op
--- BENCH: BenchmarkNextFilteredUntilSelection
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
bench_traversal_test.go:596: NextFilteredUntilSelection=22
BenchmarkNextFilteredUntilNodes 50000 62139 ns/op
--- BENCH: BenchmarkNextFilteredUntilNodes
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
bench_traversal_test.go:614: NextFilteredUntilNodes=22
BenchmarkPrevFilteredUntil 50000 43409 ns/op
--- BENCH: BenchmarkPrevFilteredUntil
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
bench_traversal_test.go:630: PrevFilteredUntil=20
BenchmarkPrevFilteredUntilSelection 50000 63768 ns/op
--- BENCH: BenchmarkPrevFilteredUntilSelection
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
bench_traversal_test.go:647: PrevFilteredUntilSelection=20
BenchmarkPrevFilteredUntilNodes 50000 63543 ns/op
--- BENCH: BenchmarkPrevFilteredUntilNodes
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
bench_traversal_test.go:665: PrevFilteredUntilNodes=20
BenchmarkClosest 500000 5110 ns/op
--- BENCH: BenchmarkClosest
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
bench_traversal_test.go:681: Closest=2
BenchmarkClosestSelection 5000000 629 ns/op
--- BENCH: BenchmarkClosestSelection
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
bench_traversal_test.go:698: ClosestSelection=2
BenchmarkClosestNodes 5000000 627 ns/op
--- BENCH: BenchmarkClosestNodes
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
bench_traversal_test.go:715: ClosestNodes=2
ok github.com/PuerkitoBio/goquery 215.785s

85
vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.0-go1.7

@ -1,85 +0,0 @@
BenchmarkFirst-4 30000000 50.7 ns/op 48 B/op 1 allocs/op
BenchmarkLast-4 30000000 50.9 ns/op 48 B/op 1 allocs/op
BenchmarkEq-4 30000000 55.7 ns/op 48 B/op 1 allocs/op
BenchmarkSlice-4 500000000 3.45 ns/op 0 B/op 0 allocs/op
BenchmarkGet-4 2000000000 1.68 ns/op 0 B/op 0 allocs/op
BenchmarkIndex-4 3000000 541 ns/op 248 B/op 10 allocs/op
BenchmarkIndexSelector-4 200000 10749 ns/op 2464 B/op 17 allocs/op
BenchmarkIndexOfNode-4 200000000 6.47 ns/op 0 B/op 0 allocs/op
BenchmarkIndexOfSelection-4 200000000 7.27 ns/op 0 B/op 0 allocs/op
BenchmarkMetalReviewExample-4 10000 138426 ns/op 12240 B/op 319 allocs/op
BenchmarkAdd-4 200000 10192 ns/op 208 B/op 9 allocs/op
BenchmarkAddSelection-4 10000000 158 ns/op 48 B/op 1 allocs/op
BenchmarkAddNodes-4 10000000 156 ns/op 48 B/op 1 allocs/op
BenchmarkAndSelf-4 1000000 1588 ns/op 1008 B/op 5 allocs/op
BenchmarkFilter-4 100000 20427 ns/op 360 B/op 8 allocs/op
BenchmarkNot-4 100000 23508 ns/op 136 B/op 5 allocs/op
BenchmarkFilterFunction-4 50000 34178 ns/op 22976 B/op 755 allocs/op
BenchmarkNotFunction-4 50000 38173 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterNodes-4 50000 34001 ns/op 20960 B/op 749 allocs/op
BenchmarkNotNodes-4 30000 40344 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterSelection-4 50000 33308 ns/op 20960 B/op 749 allocs/op
BenchmarkNotSelection-4 30000 40748 ns/op 29120 B/op 757 allocs/op
BenchmarkHas-4 5000 263346 ns/op 1816 B/op 48 allocs/op
BenchmarkHasNodes-4 10000 160840 ns/op 21184 B/op 752 allocs/op
BenchmarkHasSelection-4 10000 165410 ns/op 21184 B/op 752 allocs/op
BenchmarkEnd-4 2000000000 1.01 ns/op 0 B/op 0 allocs/op
BenchmarkEach-4 300000 4664 ns/op 3304 B/op 118 allocs/op
BenchmarkMap-4 200000 8286 ns/op 5572 B/op 184 allocs/op
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op
BenchmarkAttr-4 100000000 21.6 ns/op 0 B/op 0 allocs/op
BenchmarkText-4 200000 8909 ns/op 7536 B/op 110 allocs/op
BenchmarkLength-4 2000000000 0.34 ns/op 0 B/op 0 allocs/op
BenchmarkHtml-4 3000000 422 ns/op 120 B/op 2 allocs/op
BenchmarkIs-4 100000 22615 ns/op 88 B/op 4 allocs/op
BenchmarkIsPositional-4 50000 26655 ns/op 1112 B/op 10 allocs/op
BenchmarkIsFunction-4 1000000 1208 ns/op 784 B/op 28 allocs/op
BenchmarkIsSelection-4 50000 33497 ns/op 20960 B/op 749 allocs/op
BenchmarkIsNodes-4 50000 33572 ns/op 20960 B/op 749 allocs/op
BenchmarkHasClass-4 10000 232802 ns/op 14944 B/op 976 allocs/op
BenchmarkContains-4 200000000 7.33 ns/op 0 B/op 0 allocs/op
BenchmarkFind-4 200000 10715 ns/op 2464 B/op 17 allocs/op
BenchmarkFindWithinSelection-4 50000 35878 ns/op 2176 B/op 78 allocs/op
BenchmarkFindSelection-4 10000 194356 ns/op 2672 B/op 82 allocs/op
BenchmarkFindNodes-4 10000 195510 ns/op 2672 B/op 82 allocs/op
BenchmarkContents-4 1000000 2252 ns/op 864 B/op 34 allocs/op
BenchmarkContentsFiltered-4 500000 3015 ns/op 1016 B/op 39 allocs/op
BenchmarkChildren-4 5000000 364 ns/op 152 B/op 7 allocs/op
BenchmarkChildrenFiltered-4 1000000 2212 ns/op 352 B/op 15 allocs/op
BenchmarkParent-4 50000 24643 ns/op 4048 B/op 381 allocs/op
BenchmarkParentFiltered-4 50000 25967 ns/op 4248 B/op 388 allocs/op
BenchmarkParents-4 30000 50000 ns/op 27776 B/op 830 allocs/op
BenchmarkParentsFiltered-4 30000 53107 ns/op 28360 B/op 838 allocs/op
BenchmarkParentsUntil-4 100000 22423 ns/op 10352 B/op 353 allocs/op
BenchmarkParentsUntilSelection-4 20000 86925 ns/op 51144 B/op 1516 allocs/op
BenchmarkParentsUntilNodes-4 20000 87597 ns/op 51144 B/op 1516 allocs/op
BenchmarkParentsFilteredUntil-4 300000 5568 ns/op 2232 B/op 86 allocs/op
BenchmarkParentsFilteredUntilSelection-4 200000 10966 ns/op 5440 B/op 190 allocs/op
BenchmarkParentsFilteredUntilNodes-4 200000 10919 ns/op 5440 B/op 190 allocs/op
BenchmarkSiblings-4 30000 46018 ns/op 15400 B/op 204 allocs/op
BenchmarkSiblingsFiltered-4 30000 50566 ns/op 16496 B/op 213 allocs/op
BenchmarkNext-4 200000 7921 ns/op 3216 B/op 112 allocs/op
BenchmarkNextFiltered-4 200000 8804 ns/op 3416 B/op 118 allocs/op
BenchmarkNextAll-4 50000 31098 ns/op 9912 B/op 138 allocs/op
BenchmarkNextAllFiltered-4 50000 34677 ns/op 11008 B/op 147 allocs/op
BenchmarkPrev-4 200000 7920 ns/op 3216 B/op 112 allocs/op
BenchmarkPrevFiltered-4 200000 8913 ns/op 3416 B/op 118 allocs/op
BenchmarkPrevAll-4 200000 10845 ns/op 4376 B/op 113 allocs/op
BenchmarkPrevAllFiltered-4 100000 12030 ns/op 4576 B/op 119 allocs/op
BenchmarkNextUntil-4 100000 19193 ns/op 5760 B/op 260 allocs/op
BenchmarkNextUntilSelection-4 50000 34829 ns/op 18480 B/op 542 allocs/op
BenchmarkNextUntilNodes-4 100000 14459 ns/op 7944 B/op 248 allocs/op
BenchmarkPrevUntil-4 20000 66296 ns/op 12856 B/op 448 allocs/op
BenchmarkPrevUntilSelection-4 30000 45037 ns/op 23432 B/op 689 allocs/op
BenchmarkPrevUntilNodes-4 200000 11525 ns/op 6152 B/op 203 allocs/op
BenchmarkNextFilteredUntil-4 100000 12940 ns/op 4512 B/op 173 allocs/op
BenchmarkNextFilteredUntilSelection-4 50000 38924 ns/op 19160 B/op 567 allocs/op
BenchmarkNextFilteredUntilNodes-4 50000 38528 ns/op 19160 B/op 567 allocs/op
BenchmarkPrevFilteredUntil-4 100000 12980 ns/op 4664 B/op 175 allocs/op
BenchmarkPrevFilteredUntilSelection-4 50000 39671 ns/op 19936 B/op 587 allocs/op
BenchmarkPrevFilteredUntilNodes-4 50000 39484 ns/op 19936 B/op 587 allocs/op
BenchmarkClosest-4 500000 3310 ns/op 160 B/op 8 allocs/op
BenchmarkClosestSelection-4 5000000 361 ns/op 96 B/op 6 allocs/op
BenchmarkClosestNodes-4 5000000 359 ns/op 96 B/op 6 allocs/op
PASS
ok github.com/PuerkitoBio/goquery 163.718s

85
vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1a-go1.7

@ -1,85 +0,0 @@
BenchmarkFirst-4 30000000 50.9 ns/op 48 B/op 1 allocs/op
BenchmarkLast-4 30000000 50.0 ns/op 48 B/op 1 allocs/op
BenchmarkEq-4 30000000 50.5 ns/op 48 B/op 1 allocs/op
BenchmarkSlice-4 500000000 3.53 ns/op 0 B/op 0 allocs/op
BenchmarkGet-4 2000000000 1.66 ns/op 0 B/op 0 allocs/op
BenchmarkIndex-4 2000000 832 ns/op 248 B/op 10 allocs/op
BenchmarkIndexSelector-4 100000 16073 ns/op 3839 B/op 21 allocs/op
BenchmarkIndexOfNode-4 200000000 6.38 ns/op 0 B/op 0 allocs/op
BenchmarkIndexOfSelection-4 200000000 7.14 ns/op 0 B/op 0 allocs/op
BenchmarkMetalReviewExample-4 10000 140737 ns/op 12418 B/op 320 allocs/op
BenchmarkAdd-4 100000 13162 ns/op 974 B/op 10 allocs/op
BenchmarkAddSelection-4 500000 3160 ns/op 814 B/op 2 allocs/op
BenchmarkAddNodes-4 500000 3159 ns/op 814 B/op 2 allocs/op
BenchmarkAndSelf-4 200000 7423 ns/op 2404 B/op 9 allocs/op
BenchmarkFilter-4 100000 19671 ns/op 360 B/op 8 allocs/op
BenchmarkNot-4 100000 22577 ns/op 136 B/op 5 allocs/op
BenchmarkFilterFunction-4 50000 33960 ns/op 22976 B/op 755 allocs/op
BenchmarkNotFunction-4 50000 37909 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterNodes-4 50000 34196 ns/op 20960 B/op 749 allocs/op
BenchmarkNotNodes-4 30000 40446 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterSelection-4 50000 33091 ns/op 20960 B/op 749 allocs/op
BenchmarkNotSelection-4 30000 40609 ns/op 29120 B/op 757 allocs/op
BenchmarkHas-4 5000 262936 ns/op 2371 B/op 50 allocs/op
BenchmarkHasNodes-4 10000 148631 ns/op 21184 B/op 752 allocs/op
BenchmarkHasSelection-4 10000 153117 ns/op 21184 B/op 752 allocs/op
BenchmarkEnd-4 2000000000 1.02 ns/op 0 B/op 0 allocs/op
BenchmarkEach-4 300000 4653 ns/op 3304 B/op 118 allocs/op
BenchmarkMap-4 200000 8257 ns/op 5572 B/op 184 allocs/op
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op
BenchmarkAttr-4 100000000 22.0 ns/op 0 B/op 0 allocs/op
BenchmarkText-4 200000 8913 ns/op 7536 B/op 110 allocs/op
BenchmarkLength-4 2000000000 0.35 ns/op 0 B/op 0 allocs/op
BenchmarkHtml-4 5000000 398 ns/op 120 B/op 2 allocs/op
BenchmarkIs-4 100000 22392 ns/op 88 B/op 4 allocs/op
BenchmarkIsPositional-4 50000 26259 ns/op 1112 B/op 10 allocs/op
BenchmarkIsFunction-4 1000000 1212 ns/op 784 B/op 28 allocs/op
BenchmarkIsSelection-4 50000 33222 ns/op 20960 B/op 749 allocs/op
BenchmarkIsNodes-4 50000 33408 ns/op 20960 B/op 749 allocs/op
BenchmarkHasClass-4 10000 233208 ns/op 14944 B/op 976 allocs/op
BenchmarkContains-4 200000000 7.57 ns/op 0 B/op 0 allocs/op
BenchmarkFind-4 100000 16121 ns/op 3839 B/op 21 allocs/op
BenchmarkFindWithinSelection-4 20000 68019 ns/op 11521 B/op 97 allocs/op
BenchmarkFindSelection-4 5000 387582 ns/op 59787 B/op 176 allocs/op
BenchmarkFindNodes-4 5000 389246 ns/op 59797 B/op 176 allocs/op
BenchmarkContents-4 200000 11475 ns/op 2878 B/op 42 allocs/op
BenchmarkContentsFiltered-4 200000 11222 ns/op 2498 B/op 46 allocs/op
BenchmarkChildren-4 2000000 650 ns/op 152 B/op 7 allocs/op
BenchmarkChildrenFiltered-4 500000 2568 ns/op 352 B/op 15 allocs/op
BenchmarkParent-4 2000 702513 ns/op 194478 B/op 828 allocs/op
BenchmarkParentFiltered-4 2000 690778 ns/op 194658 B/op 835 allocs/op
BenchmarkParents-4 10000 124855 ns/op 49869 B/op 868 allocs/op
BenchmarkParentsFiltered-4 10000 128535 ns/op 50456 B/op 876 allocs/op
BenchmarkParentsUntil-4 20000 72982 ns/op 23802 B/op 388 allocs/op
BenchmarkParentsUntilSelection-4 10000 156099 ns/op 72453 B/op 1549 allocs/op
BenchmarkParentsUntilNodes-4 10000 156610 ns/op 72455 B/op 1549 allocs/op
BenchmarkParentsFilteredUntil-4 100000 15549 ns/op 4068 B/op 94 allocs/op
BenchmarkParentsFilteredUntilSelection-4 100000 20564 ns/op 7276 B/op 198 allocs/op
BenchmarkParentsFilteredUntilNodes-4 100000 20635 ns/op 7276 B/op 198 allocs/op
BenchmarkSiblings-4 3000 565114 ns/op 205910 B/op 336 allocs/op
BenchmarkSiblingsFiltered-4 3000 580264 ns/op 206993 B/op 345 allocs/op
BenchmarkNext-4 20000 93177 ns/op 26810 B/op 169 allocs/op
BenchmarkNextFiltered-4 20000 94171 ns/op 27013 B/op 175 allocs/op
BenchmarkNextAll-4 5000 270320 ns/op 89289 B/op 237 allocs/op
BenchmarkNextAllFiltered-4 5000 275283 ns/op 90375 B/op 246 allocs/op
BenchmarkPrev-4 20000 92777 ns/op 26810 B/op 169 allocs/op
BenchmarkPrevFiltered-4 20000 95577 ns/op 27007 B/op 175 allocs/op
BenchmarkPrevAll-4 20000 86339 ns/op 27515 B/op 151 allocs/op
BenchmarkPrevAllFiltered-4 20000 87759 ns/op 27715 B/op 157 allocs/op
BenchmarkNextUntil-4 10000 163930 ns/op 48541 B/op 330 allocs/op
BenchmarkNextUntilSelection-4 30000 56382 ns/op 23880 B/op 556 allocs/op
BenchmarkNextUntilNodes-4 100000 18883 ns/op 8703 B/op 252 allocs/op
BenchmarkPrevUntil-4 3000 484668 ns/op 145402 B/op 611 allocs/op
BenchmarkPrevUntilSelection-4 20000 72125 ns/op 28865 B/op 705 allocs/op
BenchmarkPrevUntilNodes-4 100000 14722 ns/op 6510 B/op 205 allocs/op
BenchmarkNextFilteredUntil-4 50000 39006 ns/op 10990 B/op 192 allocs/op
BenchmarkNextFilteredUntilSelection-4 20000 66048 ns/op 25641 B/op 586 allocs/op
BenchmarkNextFilteredUntilNodes-4 20000 65314 ns/op 25640 B/op 586 allocs/op
BenchmarkPrevFilteredUntil-4 50000 33312 ns/op 9709 B/op 189 allocs/op
BenchmarkPrevFilteredUntilSelection-4 20000 64197 ns/op 24981 B/op 601 allocs/op
BenchmarkPrevFilteredUntilNodes-4 20000 64505 ns/op 24982 B/op 601 allocs/op
BenchmarkClosest-4 500000 4065 ns/op 160 B/op 8 allocs/op
BenchmarkClosestSelection-4 2000000 756 ns/op 96 B/op 6 allocs/op
BenchmarkClosestNodes-4 2000000 753 ns/op 96 B/op 6 allocs/op
PASS
ok github.com/PuerkitoBio/goquery 162.053s

85
vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1b-go1.7

@ -1,85 +0,0 @@
BenchmarkFirst-4 30000000 51.8 ns/op 48 B/op 1 allocs/op
BenchmarkLast-4 30000000 50.1 ns/op 48 B/op 1 allocs/op
BenchmarkEq-4 30000000 51.4 ns/op 48 B/op 1 allocs/op
BenchmarkSlice-4 500000000 3.52 ns/op 0 B/op 0 allocs/op
BenchmarkGet-4 2000000000 1.65 ns/op 0 B/op 0 allocs/op
BenchmarkIndex-4 2000000 787 ns/op 248 B/op 10 allocs/op
BenchmarkIndexSelector-4 100000 16952 ns/op 3839 B/op 21 allocs/op
BenchmarkIndexOfNode-4 200000000 6.42 ns/op 0 B/op 0 allocs/op
BenchmarkIndexOfSelection-4 200000000 7.12 ns/op 0 B/op 0 allocs/op
BenchmarkMetalReviewExample-4 10000 141994 ns/op 12418 B/op 320 allocs/op
BenchmarkAdd-4 200000 10367 ns/op 208 B/op 9 allocs/op
BenchmarkAddSelection-4 10000000 152 ns/op 48 B/op 1 allocs/op
BenchmarkAddNodes-4 10000000 147 ns/op 48 B/op 1 allocs/op
BenchmarkAndSelf-4 1000000 1647 ns/op 1008 B/op 5 allocs/op
BenchmarkFilter-4 100000 19522 ns/op 360 B/op 8 allocs/op
BenchmarkNot-4 100000 22546 ns/op 136 B/op 5 allocs/op
BenchmarkFilterFunction-4 50000 35087 ns/op 22976 B/op 755 allocs/op
BenchmarkNotFunction-4 50000 39123 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterNodes-4 50000 34890 ns/op 20960 B/op 749 allocs/op
BenchmarkNotNodes-4 30000 41145 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterSelection-4 50000 33735 ns/op 20960 B/op 749 allocs/op
BenchmarkNotSelection-4 30000 41334 ns/op 29120 B/op 757 allocs/op
BenchmarkHas-4 5000 264058 ns/op 2370 B/op 50 allocs/op
BenchmarkHasNodes-4 10000 151718 ns/op 21184 B/op 752 allocs/op
BenchmarkHasSelection-4 10000 156955 ns/op 21184 B/op 752 allocs/op
BenchmarkEnd-4 2000000000 1.01 ns/op 0 B/op 0 allocs/op
BenchmarkEach-4 300000 4660 ns/op 3304 B/op 118 allocs/op
BenchmarkMap-4 200000 8404 ns/op 5572 B/op 184 allocs/op
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op
BenchmarkAttr-4 100000000 21.6 ns/op 0 B/op 0 allocs/op
BenchmarkText-4 200000 8911 ns/op 7536 B/op 110 allocs/op
BenchmarkLength-4 2000000000 0.34 ns/op 0 B/op 0 allocs/op
BenchmarkHtml-4 3000000 405 ns/op 120 B/op 2 allocs/op
BenchmarkIs-4 100000 22228 ns/op 88 B/op 4 allocs/op
BenchmarkIsPositional-4 50000 26469 ns/op 1112 B/op 10 allocs/op
BenchmarkIsFunction-4 1000000 1240 ns/op 784 B/op 28 allocs/op
BenchmarkIsSelection-4 50000 33709 ns/op 20960 B/op 749 allocs/op
BenchmarkIsNodes-4 50000 33711 ns/op 20960 B/op 749 allocs/op
BenchmarkHasClass-4 10000 236005 ns/op 14944 B/op 976 allocs/op
BenchmarkContains-4 200000000 7.47 ns/op 0 B/op 0 allocs/op
BenchmarkFind-4 100000 16075 ns/op 3839 B/op 21 allocs/op
BenchmarkFindWithinSelection-4 30000 41418 ns/op 3539 B/op 82 allocs/op
BenchmarkFindSelection-4 10000 209490 ns/op 5616 B/op 89 allocs/op
BenchmarkFindNodes-4 10000 208206 ns/op 5614 B/op 89 allocs/op
BenchmarkContents-4 300000 4751 ns/op 1420 B/op 36 allocs/op
BenchmarkContentsFiltered-4 300000 5454 ns/op 1570 B/op 41 allocs/op
BenchmarkChildren-4 3000000 527 ns/op 152 B/op 7 allocs/op
BenchmarkChildrenFiltered-4 1000000 2484 ns/op 352 B/op 15 allocs/op
BenchmarkParent-4 50000 34724 ns/op 6940 B/op 387 allocs/op
BenchmarkParentFiltered-4 50000 35596 ns/op 7141 B/op 394 allocs/op
BenchmarkParents-4 20000 62094 ns/op 30720 B/op 837 allocs/op
BenchmarkParentsFiltered-4 20000 63223 ns/op 31304 B/op 845 allocs/op
BenchmarkParentsUntil-4 50000 30391 ns/op 11828 B/op 358 allocs/op
BenchmarkParentsUntilSelection-4 20000 99962 ns/op 54075 B/op 1523 allocs/op
BenchmarkParentsUntilNodes-4 20000 98763 ns/op 54073 B/op 1523 allocs/op
BenchmarkParentsFilteredUntil-4 200000 7982 ns/op 2787 B/op 88 allocs/op
BenchmarkParentsFilteredUntilSelection-4 100000 13618 ns/op 5995 B/op 192 allocs/op
BenchmarkParentsFilteredUntilNodes-4 100000 13639 ns/op 5994 B/op 192 allocs/op
BenchmarkSiblings-4 20000 75287 ns/op 28453 B/op 225 allocs/op
BenchmarkSiblingsFiltered-4 20000 80139 ns/op 29543 B/op 234 allocs/op
BenchmarkNext-4 100000 14270 ns/op 4659 B/op 117 allocs/op
BenchmarkNextFiltered-4 100000 15352 ns/op 4860 B/op 123 allocs/op
BenchmarkNextAll-4 20000 60811 ns/op 22771 B/op 157 allocs/op
BenchmarkNextAllFiltered-4 20000 69079 ns/op 23871 B/op 166 allocs/op
BenchmarkPrev-4 100000 14417 ns/op 4659 B/op 117 allocs/op
BenchmarkPrevFiltered-4 100000 15443 ns/op 4859 B/op 123 allocs/op
BenchmarkPrevAll-4 100000 22008 ns/op 7346 B/op 120 allocs/op
BenchmarkPrevAllFiltered-4 100000 23212 ns/op 7544 B/op 126 allocs/op
BenchmarkNextUntil-4 50000 30589 ns/op 8767 B/op 267 allocs/op
BenchmarkNextUntilSelection-4 30000 40875 ns/op 19862 B/op 546 allocs/op
BenchmarkNextUntilNodes-4 100000 15987 ns/op 8134 B/op 249 allocs/op
BenchmarkPrevUntil-4 20000 98799 ns/op 25727 B/op 467 allocs/op
BenchmarkPrevUntilSelection-4 30000 51874 ns/op 24875 B/op 694 allocs/op
BenchmarkPrevUntilNodes-4 100000 12901 ns/op 6334 B/op 204 allocs/op
BenchmarkNextFilteredUntil-4 100000 19869 ns/op 5909 B/op 177 allocs/op
BenchmarkNextFilteredUntilSelection-4 30000 45412 ns/op 20557 B/op 571 allocs/op
BenchmarkNextFilteredUntilNodes-4 30000 45363 ns/op 20557 B/op 571 allocs/op
BenchmarkPrevFilteredUntil-4 100000 19357 ns/op 6033 B/op 179 allocs/op
BenchmarkPrevFilteredUntilSelection-4 30000 46396 ns/op 21305 B/op 591 allocs/op
BenchmarkPrevFilteredUntilNodes-4 30000 46133 ns/op 21305 B/op 591 allocs/op
BenchmarkClosest-4 500000 3448 ns/op 160 B/op 8 allocs/op
BenchmarkClosestSelection-4 3000000 528 ns/op 96 B/op 6 allocs/op
BenchmarkClosestNodes-4 3000000 523 ns/op 96 B/op 6 allocs/op
PASS
ok github.com/PuerkitoBio/goquery 162.012s

86
vendor/src/github.com/PuerkitoBio/goquery/bench/v1.0.1c-go1.7

@ -1,86 +0,0 @@
BenchmarkFirst-4 30000000 51.7 ns/op 48 B/op 1 allocs/op
BenchmarkLast-4 30000000 51.9 ns/op 48 B/op 1 allocs/op
BenchmarkEq-4 30000000 50.0 ns/op 48 B/op 1 allocs/op
BenchmarkSlice-4 500000000 3.47 ns/op 0 B/op 0 allocs/op
BenchmarkGet-4 2000000000 1.68 ns/op 0 B/op 0 allocs/op
BenchmarkIndex-4 2000000 804 ns/op 248 B/op 10 allocs/op
BenchmarkIndexSelector-4 100000 16285 ns/op 3839 B/op 21 allocs/op
BenchmarkIndexOfNode-4 200000000 6.50 ns/op 0 B/op 0 allocs/op
BenchmarkIndexOfSelection-4 200000000 7.02 ns/op 0 B/op 0 allocs/op
BenchmarkMetalReviewExample-4 10000 143160 ns/op 12417 B/op 320 allocs/op
BenchmarkAdd-4 200000 10326 ns/op 208 B/op 9 allocs/op
BenchmarkAddSelection-4 10000000 155 ns/op 48 B/op 1 allocs/op
BenchmarkAddNodes-4 10000000 156 ns/op 48 B/op 1 allocs/op
BenchmarkAddNodesBig-4 20000 94439 ns/op 21847 B/op 37 allocs/op
BenchmarkAndSelf-4 1000000 1791 ns/op 1008 B/op 5 allocs/op
BenchmarkFilter-4 100000 19470 ns/op 360 B/op 8 allocs/op
BenchmarkNot-4 100000 22500 ns/op 136 B/op 5 allocs/op
BenchmarkFilterFunction-4 50000 34578 ns/op 22976 B/op 755 allocs/op
BenchmarkNotFunction-4 50000 38703 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterNodes-4 50000 34486 ns/op 20960 B/op 749 allocs/op
BenchmarkNotNodes-4 30000 41094 ns/op 29120 B/op 757 allocs/op
BenchmarkFilterSelection-4 50000 33623 ns/op 20960 B/op 749 allocs/op
BenchmarkNotSelection-4 30000 41483 ns/op 29120 B/op 757 allocs/op
BenchmarkHas-4 5000 266628 ns/op 2371 B/op 50 allocs/op
BenchmarkHasNodes-4 10000 152617 ns/op 21184 B/op 752 allocs/op
BenchmarkHasSelection-4 10000 156682 ns/op 21184 B/op 752 allocs/op
BenchmarkEnd-4 2000000000 1.00 ns/op 0 B/op 0 allocs/op
BenchmarkEach-4 300000 4712 ns/op 3304 B/op 118 allocs/op
BenchmarkMap-4 200000 8434 ns/op 5572 B/op 184 allocs/op
BenchmarkEachWithBreak-4 2000000 819 ns/op 560 B/op 20 allocs/op
BenchmarkAttr-4 100000000 21.7 ns/op 0 B/op 0 allocs/op
BenchmarkText-4 200000 9376 ns/op 7536 B/op 110 allocs/op
BenchmarkLength-4 2000000000 0.35 ns/op 0 B/op 0 allocs/op
BenchmarkHtml-4 5000000 401 ns/op 120 B/op 2 allocs/op
BenchmarkIs-4 100000 22214 ns/op 88 B/op 4 allocs/op
BenchmarkIsPositional-4 50000 26559 ns/op 1112 B/op 10 allocs/op
BenchmarkIsFunction-4 1000000 1228 ns/op 784 B/op 28 allocs/op
BenchmarkIsSelection-4 50000 33471 ns/op 20960 B/op 749 allocs/op
BenchmarkIsNodes-4 50000 34461 ns/op 20960 B/op 749 allocs/op
BenchmarkHasClass-4 10000 232429 ns/op 14944 B/op 976 allocs/op
BenchmarkContains-4 200000000 7.62 ns/op 0 B/op 0 allocs/op
BenchmarkFind-4 100000 16114 ns/op 3839 B/op 21 allocs/op
BenchmarkFindWithinSelection-4 30000 42520 ns/op 3540 B/op 82 allocs/op
BenchmarkFindSelection-4 10000 209801 ns/op 5615 B/op 89 allocs/op
BenchmarkFindNodes-4 10000 209082 ns/op 5614 B/op 89 allocs/op
BenchmarkContents-4 300000 4836 ns/op 1420 B/op 36 allocs/op
BenchmarkContentsFiltered-4 200000 5495 ns/op 1570 B/op 41 allocs/op
BenchmarkChildren-4 3000000 527 ns/op 152 B/op 7 allocs/op
BenchmarkChildrenFiltered-4 500000 2499 ns/op 352 B/op 15 allocs/op
BenchmarkParent-4 50000 34072 ns/op 6942 B/op 387 allocs/op
BenchmarkParentFiltered-4 50000 36077 ns/op 7141 B/op 394 allocs/op
BenchmarkParents-4 20000 64118 ns/op 30719 B/op 837 allocs/op
BenchmarkParentsFiltered-4 20000 63432 ns/op 31303 B/op 845 allocs/op
BenchmarkParentsUntil-4 50000 29589 ns/op 11829 B/op 358 allocs/op
BenchmarkParentsUntilSelection-4 10000 101033 ns/op 54076 B/op 1523 allocs/op
BenchmarkParentsUntilNodes-4 10000 100584 ns/op 54076 B/op 1523 allocs/op
BenchmarkParentsFilteredUntil-4 200000 8061 ns/op 2787 B/op 88 allocs/op
BenchmarkParentsFilteredUntilSelection-4 100000 13848 ns/op 5995 B/op 192 allocs/op
BenchmarkParentsFilteredUntilNodes-4 100000 13766 ns/op 5995 B/op 192 allocs/op
BenchmarkSiblings-4 20000 75135 ns/op 28453 B/op 225 allocs/op
BenchmarkSiblingsFiltered-4 20000 80532 ns/op 29544 B/op 234 allocs/op
BenchmarkNext-4 100000 14200 ns/op 4660 B/op 117 allocs/op
BenchmarkNextFiltered-4 100000 15284 ns/op 4859 B/op 123 allocs/op
BenchmarkNextAll-4 20000 60889 ns/op 22774 B/op 157 allocs/op
BenchmarkNextAllFiltered-4 20000 65125 ns/op 23869 B/op 166 allocs/op
BenchmarkPrev-4 100000 14448 ns/op 4659 B/op 117 allocs/op
BenchmarkPrevFiltered-4 100000 15444 ns/op 4859 B/op 123 allocs/op
BenchmarkPrevAll-4 100000 22019 ns/op 7344 B/op 120 allocs/op
BenchmarkPrevAllFiltered-4 100000 23307 ns/op 7545 B/op 126 allocs/op
BenchmarkNextUntil-4 50000 30287 ns/op 8766 B/op 267 allocs/op
BenchmarkNextUntilSelection-4 30000 41476 ns/op 19862 B/op 546 allocs/op
BenchmarkNextUntilNodes-4 100000 16106 ns/op 8133 B/op 249 allocs/op
BenchmarkPrevUntil-4 20000 98951 ns/op 25728 B/op 467 allocs/op
BenchmarkPrevUntilSelection-4 30000 52390 ns/op 24875 B/op 694 allocs/op
BenchmarkPrevUntilNodes-4 100000 12986 ns/op 6334 B/op 204 allocs/op
BenchmarkNextFilteredUntil-4 100000 19365 ns/op 5908 B/op 177 allocs/op
BenchmarkNextFilteredUntilSelection-4 30000 45334 ns/op 20555 B/op 571 allocs/op
BenchmarkNextFilteredUntilNodes-4 30000 45292 ns/op 20556 B/op 571 allocs/op
BenchmarkPrevFilteredUntil-4 100000 19412 ns/op 6032 B/op 179 allocs/op
BenchmarkPrevFilteredUntilSelection-4 30000 46286 ns/op 21304 B/op 591 allocs/op
BenchmarkPrevFilteredUntilNodes-4 30000 46554 ns/op 21305 B/op 591 allocs/op
BenchmarkClosest-4 500000 3480 ns/op 160 B/op 8 allocs/op
BenchmarkClosestSelection-4 2000000 722 ns/op 96 B/op 6 allocs/op
BenchmarkClosestNodes-4 2000000 719 ns/op 96 B/op 6 allocs/op
PASS
ok github.com/PuerkitoBio/goquery 160.565s

120
vendor/src/github.com/PuerkitoBio/goquery/bench_array_test.go

@ -1,120 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkFirst(b *testing.B) {
b.StopTimer()
sel := DocB().Find("dd")
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.First()
}
}
func BenchmarkLast(b *testing.B) {
b.StopTimer()
sel := DocB().Find("dd")
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Last()
}
}
func BenchmarkEq(b *testing.B) {
b.StopTimer()
sel := DocB().Find("dd")
j := 0
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Eq(j)
if j++; j >= sel.Length() {
j = 0
}
}
}
func BenchmarkSlice(b *testing.B) {
b.StopTimer()
sel := DocB().Find("dd")
j := 0
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Slice(j, j+4)
if j++; j >= (sel.Length() - 4) {
j = 0
}
}
}
func BenchmarkGet(b *testing.B) {
b.StopTimer()
sel := DocB().Find("dd")
j := 0
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Get(j)
if j++; j >= sel.Length() {
j = 0
}
}
}
func BenchmarkIndex(b *testing.B) {
var j int
b.StopTimer()
sel := DocB().Find("#Main")
b.StartTimer()
for i := 0; i < b.N; i++ {
j = sel.Index()
}
if j != 3 {
b.Fatalf("want 3, got %d", j)
}
}
func BenchmarkIndexSelector(b *testing.B) {
var j int
b.StopTimer()
sel := DocB().Find("#manual-nav dl dd:nth-child(1)")
b.StartTimer()
for i := 0; i < b.N; i++ {
j = sel.IndexSelector("dd")
}
if j != 4 {
b.Fatalf("want 4, got %d", j)
}
}
func BenchmarkIndexOfNode(b *testing.B) {
var j int
b.StopTimer()
sel := DocB().Find("span a")
sel2 := DocB().Find("span a:nth-child(3)")
n := sel2.Get(0)
b.StartTimer()
for i := 0; i < b.N; i++ {
j = sel.IndexOfNode(n)
}
if j != 2 {
b.Fatalf("want 2, got %d", j)
}
}
func BenchmarkIndexOfSelection(b *testing.B) {
var j int
b.StopTimer()
sel := DocB().Find("span a")
sel2 := DocB().Find("span a:nth-child(3)")
b.StartTimer()
for i := 0; i < b.N; i++ {
j = sel.IndexOfSelection(sel2)
}
if j != 2 {
b.Fatalf("want 2, got %d", j)
}
}

40
vendor/src/github.com/PuerkitoBio/goquery/bench_example_test.go

@ -1,40 +0,0 @@
package goquery
import (
"bytes"
"fmt"
"strconv"
"testing"
)
func BenchmarkMetalReviewExample(b *testing.B) {
var n int
var buf bytes.Buffer
b.StopTimer()
doc := loadDoc("metalreview.html")
b.StartTimer()
for i := 0; i < b.N; i++ {
doc.Find(".slider-row:nth-child(1) .slider-item").Each(func(i int, s *Selection) {
var band, title string
var score float64
var e error
n++
// For each item found, get the band, title and score, and print it
band = s.Find("strong").Text()
title = s.Find("em").Text()
if score, e = strconv.ParseFloat(s.Find(".score").Text(), 64); e != nil {
// Not a valid float, ignore score
if n <= 4 {
buf.WriteString(fmt.Sprintf("Review %d: %s - %s.\n", i, band, title))
}
} else {
// Print all, including score
if n <= 4 {
buf.WriteString(fmt.Sprintf("Review %d: %s - %s (%2.1f).\n", i, band, title, score))
}
}
})
}
}

104
vendor/src/github.com/PuerkitoBio/goquery/bench_expand_test.go

@ -1,104 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkAdd(b *testing.B) {
var n int
b.StopTimer()
sel := DocB().Find("dd")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Add("h2[title]").Length()
} else {
sel.Add("h2[title]")
}
}
if n != 43 {
b.Fatalf("want 43, got %d", n)
}
}
func BenchmarkAddSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocB().Find("dd")
sel2 := DocB().Find("h2[title]")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.AddSelection(sel2).Length()
} else {
sel.AddSelection(sel2)
}
}
if n != 43 {
b.Fatalf("want 43, got %d", n)
}
}
func BenchmarkAddNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocB().Find("dd")
sel2 := DocB().Find("h2[title]")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.AddNodes(nodes...).Length()
} else {
sel.AddNodes(nodes...)
}
}
if n != 43 {
b.Fatalf("want 43, got %d", n)
}
}
func BenchmarkAddNodesBig(b *testing.B) {
var n int
doc := DocW()
sel := doc.Find("li")
// make nodes > 1000
nodes := sel.Nodes
nodes = append(nodes, nodes...)
nodes = append(nodes, nodes...)
sel = doc.Find("xyz")
b.ResetTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.AddNodes(nodes...).Length()
} else {
sel.AddNodes(nodes...)
}
}
if n != 373 {
b.Fatalf("want 373, got %d", n)
}
}
func BenchmarkAndSelf(b *testing.B) {
var n int
b.StopTimer()
sel := DocB().Find("dd").Parent()
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.AndSelf().Length()
} else {
sel.AndSelf()
}
}
if n != 44 {
b.Fatalf("want 44, got %d", n)
}
}

236
vendor/src/github.com/PuerkitoBio/goquery/bench_filter_test.go

@ -1,236 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkFilter(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Filter(".toclevel-1").Length()
} else {
sel.Filter(".toclevel-1")
}
}
if n != 13 {
b.Fatalf("want 13, got %d", n)
}
}
func BenchmarkNot(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Not(".toclevel-2").Length()
} else {
sel.Filter(".toclevel-2")
}
}
if n != 371 {
b.Fatalf("want 371, got %d", n)
}
}
func BenchmarkFilterFunction(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
f := func(i int, s *Selection) bool {
return len(s.Get(0).Attr) > 0
}
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.FilterFunction(f).Length()
} else {
sel.FilterFunction(f)
}
}
if n != 112 {
b.Fatalf("want 112, got %d", n)
}
}
func BenchmarkNotFunction(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
f := func(i int, s *Selection) bool {
return len(s.Get(0).Attr) > 0
}
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NotFunction(f).Length()
} else {
sel.NotFunction(f)
}
}
if n != 261 {
b.Fatalf("want 261, got %d", n)
}
}
func BenchmarkFilterNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-2")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.FilterNodes(nodes...).Length()
} else {
sel.FilterNodes(nodes...)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkNotNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-1")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NotNodes(nodes...).Length()
} else {
sel.NotNodes(nodes...)
}
}
if n != 360 {
b.Fatalf("want 360, got %d", n)
}
}
func BenchmarkFilterSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-2")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.FilterSelection(sel2).Length()
} else {
sel.FilterSelection(sel2)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkNotSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-1")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NotSelection(sel2).Length()
} else {
sel.NotSelection(sel2)
}
}
if n != 360 {
b.Fatalf("want 360, got %d", n)
}
}
func BenchmarkHas(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Has(".editsection").Length()
} else {
sel.Has(".editsection")
}
}
if n != 13 {
b.Fatalf("want 13, got %d", n)
}
}
func BenchmarkHasNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".tocnumber")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.HasNodes(nodes...).Length()
} else {
sel.HasNodes(nodes...)
}
}
if n != 15 {
b.Fatalf("want 15, got %d", n)
}
}
func BenchmarkHasSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".tocnumber")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.HasSelection(sel2).Length()
} else {
sel.HasSelection(sel2)
}
}
if n != 15 {
b.Fatalf("want 15, got %d", n)
}
}
func BenchmarkEnd(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li").Has(".tocnumber")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.End().Length()
} else {
sel.End()
}
}
if n != 373 {
b.Fatalf("wnat 373, got %d", n)
}
}

68
vendor/src/github.com/PuerkitoBio/goquery/bench_iteration_test.go

@ -1,68 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkEach(b *testing.B) {
var tmp, n int
b.StopTimer()
sel := DocW().Find("td")
f := func(i int, s *Selection) {
tmp++
}
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Each(f)
if n == 0 {
n = tmp
}
}
if n != 59 {
b.Fatalf("want 59, got %d", n)
}
}
func BenchmarkMap(b *testing.B) {
var tmp, n int
b.StopTimer()
sel := DocW().Find("td")
f := func(i int, s *Selection) string {
tmp++
return string(tmp)
}
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Map(f)
if n == 0 {
n = tmp
}
}
if n != 59 {
b.Fatalf("want 59, got %d", n)
}
}
func BenchmarkEachWithBreak(b *testing.B) {
var tmp, n int
b.StopTimer()
sel := DocW().Find("td")
f := func(i int, s *Selection) bool {
tmp++
return tmp < 10
}
b.StartTimer()
for i := 0; i < b.N; i++ {
tmp = 0
sel.EachWithBreak(f)
if n == 0 {
n = tmp
}
}
if n != 10 {
b.Fatalf("want 10, got %d", n)
}
}

51
vendor/src/github.com/PuerkitoBio/goquery/bench_property_test.go

@ -1,51 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkAttr(b *testing.B) {
var s string
b.StopTimer()
sel := DocW().Find("h1")
b.StartTimer()
for i := 0; i < b.N; i++ {
s, _ = sel.Attr("id")
}
if s != "firstHeading" {
b.Fatalf("want firstHeading, got %q", s)
}
}
func BenchmarkText(b *testing.B) {
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Text()
}
}
func BenchmarkLength(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
n = sel.Length()
}
if n != 14 {
b.Fatalf("want 14, got %d", n)
}
}
func BenchmarkHtml(b *testing.B) {
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
sel.Html()
}
}

111
vendor/src/github.com/PuerkitoBio/goquery/bench_query_test.go

@ -1,111 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkIs(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.Is(".toclevel-2")
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkIsPositional(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.Is("li:nth-child(2)")
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkIsFunction(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find(".toclevel-1")
f := func(i int, s *Selection) bool {
return i == 8
}
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.IsFunction(f)
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkIsSelection(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-2")
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.IsSelection(sel2)
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkIsNodes(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("li")
sel2 := DocW().Find(".toclevel-2")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.IsNodes(nodes...)
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkHasClass(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("span")
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.HasClass("official")
}
if !y {
b.Fatal("want true")
}
}
func BenchmarkContains(b *testing.B) {
var y bool
b.StopTimer()
sel := DocW().Find("span.url")
sel2 := DocW().Find("a[rel=\"nofollow\"]")
node := sel2.Nodes[0]
b.StartTimer()
for i := 0; i < b.N; i++ {
y = sel.Contains(node)
}
if !y {
b.Fatal("want true")
}
}

802
vendor/src/github.com/PuerkitoBio/goquery/bench_traversal_test.go

@ -1,802 +0,0 @@
package goquery
import (
"testing"
)
func BenchmarkFind(b *testing.B) {
var n int
for i := 0; i < b.N; i++ {
if n == 0 {
n = DocB().Find("dd").Length()
} else {
DocB().Find("dd")
}
}
if n != 41 {
b.Fatalf("want 41, got %d", n)
}
}
func BenchmarkFindWithinSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("ul")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Find("a[class]").Length()
} else {
sel.Find("a[class]")
}
}
if n != 39 {
b.Fatalf("want 39, got %d", n)
}
}
func BenchmarkFindSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("ul")
sel2 := DocW().Find("span")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.FindSelection(sel2).Length()
} else {
sel.FindSelection(sel2)
}
}
if n != 73 {
b.Fatalf("want 73, got %d", n)
}
}
func BenchmarkFindNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("ul")
sel2 := DocW().Find("span")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.FindNodes(nodes...).Length()
} else {
sel.FindNodes(nodes...)
}
}
if n != 73 {
b.Fatalf("want 73, got %d", n)
}
}
func BenchmarkContents(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-1")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Contents().Length()
} else {
sel.Contents()
}
}
if n != 16 {
b.Fatalf("want 16, got %d", n)
}
}
func BenchmarkContentsFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-1")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ContentsFiltered("a[href=\"#Examples\"]").Length()
} else {
sel.ContentsFiltered("a[href=\"#Examples\"]")
}
}
if n != 1 {
b.Fatalf("want 1, got %d", n)
}
}
func BenchmarkChildren(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-2")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Children().Length()
} else {
sel.Children()
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkChildrenFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h3")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ChildrenFiltered(".editsection").Length()
} else {
sel.ChildrenFiltered(".editsection")
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkParent(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Parent().Length()
} else {
sel.Parent()
}
}
if n != 55 {
b.Fatalf("want 55, got %d", n)
}
}
func BenchmarkParentFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentFiltered("ul[id]").Length()
} else {
sel.ParentFiltered("ul[id]")
}
}
if n != 4 {
b.Fatalf("want 4, got %d", n)
}
}
func BenchmarkParents(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("th a")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Parents().Length()
} else {
sel.Parents()
}
}
if n != 73 {
b.Fatalf("want 73, got %d", n)
}
}
func BenchmarkParentsFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("th a")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsFiltered("tr").Length()
} else {
sel.ParentsFiltered("tr")
}
}
if n != 18 {
b.Fatalf("want 18, got %d", n)
}
}
func BenchmarkParentsUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("th a")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsUntil("table").Length()
} else {
sel.ParentsUntil("table")
}
}
if n != 52 {
b.Fatalf("want 52, got %d", n)
}
}
func BenchmarkParentsUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("th a")
sel2 := DocW().Find("#content")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsUntilSelection(sel2).Length()
} else {
sel.ParentsUntilSelection(sel2)
}
}
if n != 70 {
b.Fatalf("want 70, got %d", n)
}
}
func BenchmarkParentsUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("th a")
sel2 := DocW().Find("#content")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsUntilNodes(nodes...).Length()
} else {
sel.ParentsUntilNodes(nodes...)
}
}
if n != 70 {
b.Fatalf("want 70, got %d", n)
}
}
func BenchmarkParentsFilteredUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-1 a")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsFilteredUntil(":nth-child(1)", "ul").Length()
} else {
sel.ParentsFilteredUntil(":nth-child(1)", "ul")
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkParentsFilteredUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-1 a")
sel2 := DocW().Find("ul")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsFilteredUntilSelection(":nth-child(1)", sel2).Length()
} else {
sel.ParentsFilteredUntilSelection(":nth-child(1)", sel2)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkParentsFilteredUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find(".toclevel-1 a")
sel2 := DocW().Find("ul")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ParentsFilteredUntilNodes(":nth-child(1)", nodes...).Length()
} else {
sel.ParentsFilteredUntilNodes(":nth-child(1)", nodes...)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkSiblings(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("ul li:nth-child(1)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Siblings().Length()
} else {
sel.Siblings()
}
}
if n != 293 {
b.Fatalf("want 293, got %d", n)
}
}
func BenchmarkSiblingsFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("ul li:nth-child(1)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.SiblingsFiltered("[class]").Length()
} else {
sel.SiblingsFiltered("[class]")
}
}
if n != 46 {
b.Fatalf("want 46, got %d", n)
}
}
func BenchmarkNext(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(1)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Next().Length()
} else {
sel.Next()
}
}
if n != 49 {
b.Fatalf("want 49, got %d", n)
}
}
func BenchmarkNextFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(1)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextFiltered("[class]").Length()
} else {
sel.NextFiltered("[class]")
}
}
if n != 6 {
b.Fatalf("want 6, got %d", n)
}
}
func BenchmarkNextAll(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(3)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextAll().Length()
} else {
sel.NextAll()
}
}
if n != 234 {
b.Fatalf("want 234, got %d", n)
}
}
func BenchmarkNextAllFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(3)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextAllFiltered("[class]").Length()
} else {
sel.NextAllFiltered("[class]")
}
}
if n != 33 {
b.Fatalf("want 33, got %d", n)
}
}
func BenchmarkPrev(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:last-child")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Prev().Length()
} else {
sel.Prev()
}
}
if n != 49 {
b.Fatalf("want 49, got %d", n)
}
}
func BenchmarkPrevFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:last-child")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevFiltered("[class]").Length()
} else {
sel.PrevFiltered("[class]")
}
}
// There is one more Prev li with a class, compared to Next li with a class
// (confirmed by looking at the HTML, this is ok)
if n != 7 {
b.Fatalf("want 7, got %d", n)
}
}
func BenchmarkPrevAll(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(4)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevAll().Length()
} else {
sel.PrevAll()
}
}
if n != 78 {
b.Fatalf("want 78, got %d", n)
}
}
func BenchmarkPrevAllFiltered(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:nth-child(4)")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevAllFiltered("[class]").Length()
} else {
sel.PrevAllFiltered("[class]")
}
}
if n != 6 {
b.Fatalf("want 6, got %d", n)
}
}
func BenchmarkNextUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:first-child")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextUntil(":nth-child(4)").Length()
} else {
sel.NextUntil(":nth-child(4)")
}
}
if n != 84 {
b.Fatalf("want 84, got %d", n)
}
}
func BenchmarkNextUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("ul")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextUntilSelection(sel2).Length()
} else {
sel.NextUntilSelection(sel2)
}
}
if n != 42 {
b.Fatalf("want 42, got %d", n)
}
}
func BenchmarkNextUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("p")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextUntilNodes(nodes...).Length()
} else {
sel.NextUntilNodes(nodes...)
}
}
if n != 12 {
b.Fatalf("want 12, got %d", n)
}
}
func BenchmarkPrevUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("li:last-child")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevUntil(":nth-child(4)").Length()
} else {
sel.PrevUntil(":nth-child(4)")
}
}
if n != 238 {
b.Fatalf("want 238, got %d", n)
}
}
func BenchmarkPrevUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("ul")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevUntilSelection(sel2).Length()
} else {
sel.PrevUntilSelection(sel2)
}
}
if n != 49 {
b.Fatalf("want 49, got %d", n)
}
}
func BenchmarkPrevUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("p")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevUntilNodes(nodes...).Length()
} else {
sel.PrevUntilNodes(nodes...)
}
}
if n != 11 {
b.Fatalf("want 11, got %d", n)
}
}
func BenchmarkNextFilteredUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextFilteredUntil("p", "div").Length()
} else {
sel.NextFilteredUntil("p", "div")
}
}
if n != 22 {
b.Fatalf("want 22, got %d", n)
}
}
func BenchmarkNextFilteredUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("div")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextFilteredUntilSelection("p", sel2).Length()
} else {
sel.NextFilteredUntilSelection("p", sel2)
}
}
if n != 22 {
b.Fatalf("want 22, got %d", n)
}
}
func BenchmarkNextFilteredUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("div")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.NextFilteredUntilNodes("p", nodes...).Length()
} else {
sel.NextFilteredUntilNodes("p", nodes...)
}
}
if n != 22 {
b.Fatalf("want 22, got %d", n)
}
}
func BenchmarkPrevFilteredUntil(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevFilteredUntil("p", "div").Length()
} else {
sel.PrevFilteredUntil("p", "div")
}
}
if n != 20 {
b.Fatalf("want 20, got %d", n)
}
}
func BenchmarkPrevFilteredUntilSelection(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("div")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevFilteredUntilSelection("p", sel2).Length()
} else {
sel.PrevFilteredUntilSelection("p", sel2)
}
}
if n != 20 {
b.Fatalf("want 20, got %d", n)
}
}
func BenchmarkPrevFilteredUntilNodes(b *testing.B) {
var n int
b.StopTimer()
sel := DocW().Find("h2")
sel2 := DocW().Find("div")
nodes := sel2.Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.PrevFilteredUntilNodes("p", nodes...).Length()
} else {
sel.PrevFilteredUntilNodes("p", nodes...)
}
}
if n != 20 {
b.Fatalf("want 20, got %d", n)
}
}
func BenchmarkClosest(b *testing.B) {
var n int
b.StopTimer()
sel := Doc().Find(".container-fluid")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.Closest(".pvk-content").Length()
} else {
sel.Closest(".pvk-content")
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkClosestSelection(b *testing.B) {
var n int
b.StopTimer()
sel := Doc().Find(".container-fluid")
sel2 := Doc().Find(".pvk-content")
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ClosestSelection(sel2).Length()
} else {
sel.ClosestSelection(sel2)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}
func BenchmarkClosestNodes(b *testing.B) {
var n int
b.StopTimer()
sel := Doc().Find(".container-fluid")
nodes := Doc().Find(".pvk-content").Nodes
b.StartTimer()
for i := 0; i < b.N; i++ {
if n == 0 {
n = sel.ClosestNodes(nodes...).Length()
} else {
sel.ClosestNodes(nodes...)
}
}
if n != 2 {
b.Fatalf("want 2, got %d", n)
}
}

123
vendor/src/github.com/PuerkitoBio/goquery/doc.go

@ -1,123 +0,0 @@
// Copyright (c) 2012-2016, Martin Angers & Contributors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation and/or
// other materials provided with the distribution.
// * Neither the name of the author nor the names of its contributors may be used to
// endorse or promote products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
Package goquery implements features similar to jQuery, including the chainable
syntax, to manipulate and query an HTML document.
It brings a syntax and a set of features similar to jQuery to the Go language.
It is based on Go's net/html package and the CSS Selector library cascadia.
Since the net/html parser returns nodes, and not a full-featured DOM
tree, jQuery's stateful manipulation functions (like height(), css(), detach())
have been left off.
Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is
the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML.
See the repository's wiki for various options on how to do this.
Syntax-wise, it is as close as possible to jQuery, with the same method names when
possible, and that warm and fuzzy chainable interface. jQuery being the
ultra-popular library that it is, writing a similar HTML-manipulating
library was better to follow its API than to start anew (in the same spirit as
Go's fmt package), even though some of its methods are less than intuitive (looking
at you, index()...).
It is hosted on GitHub, along with additional documentation in the README.md
file: https://github.com/puerkitobio/goquery
Please note that because of the net/html dependency, goquery requires Go1.1+.
The various methods are split into files based on the category of behavior.
The three dots (...) indicate that various "overloads" are available.
* array.go : array-like positional manipulation of the selection.
- Eq()
- First()
- Get()
- Index...()
- Last()
- Slice()
* expand.go : methods that expand or augment the selection's set.
- Add...()
- AndSelf()
- Union(), which is an alias for AddSelection()
* filter.go : filtering methods, that reduce the selection's set.
- End()
- Filter...()
- Has...()
- Intersection(), which is an alias of FilterSelection()
- Not...()
* iteration.go : methods to loop over the selection's nodes.
- Each()
- EachWithBreak()
- Map()
* manipulation.go : methods for modifying the document
- After...()
- Append...()
- Before...()
- Clone()
- Empty()
- Prepend...()
- Remove...()
- ReplaceWith...()
- Unwrap()
- Wrap...()
- WrapAll...()
- WrapInner...()
* property.go : methods that inspect and get the node's properties values.
- Attr*(), RemoveAttr(), SetAttr()
- AddClass(), HasClass(), RemoveClass(), ToggleClass()
- Html()
- Length()
- Size(), which is an alias for Length()
- Text()
* query.go : methods that query, or reflect, a node's identity.
- Contains()
- Is...()
* traversal.go : methods to traverse the HTML document tree.
- Children...()
- Contents()
- Find...()
- Next...()
- Parent[s]...()
- Prev...()
- Siblings...()
* type.go : definition of the types exposed by goquery.
- Document
- Selection
- Matcher
* utilities.go : definition of helper functions (and not methods on a *Selection)
that are not part of jQuery, but are useful to goquery.
- NodeName
- OuterHtml
*/
package goquery

68
vendor/src/github.com/PuerkitoBio/goquery/doc/tips.md

@ -1,68 +0,0 @@
# Tips and tricks
## Handle Non-UTF8 html Pages
The `go.net/html` package used by `goquery` requires that the html document is UTF-8 encoded. When you know the encoding of the html page is not UTF-8, you can use the `iconv` package to convert it to UTF-8 (there are various implementation of the `iconv` API, see [godoc.org][iconv] for other options):
```
$ go get -u github.com/djimenez/iconv-go
```
and then:
```
// Load the URL
res, err := http.Get(url)
if err != nil {
// handle error
}
defer res.Body.Close()
// Convert the designated charset HTML to utf-8 encoded HTML.
// `charset` being one of the charsets known by the iconv package.
utfBody, err := iconv.NewReader(res.Body, charset, "utf-8")
if err != nil {
// handler error
}
// use utfBody using goquery
doc, err := goquery.NewDocumentFromReader(utfBody)
if err != nil {
// handler error
}
// use doc...
```
Thanks to github user @YuheiNakasaka.
Actually, the official go.text repository covers this use case too, see its [godoc page][text] for the details.
## Handle Javascript-based Pages
`goquery` is great to handle normal html pages, but when most of the page is build dynamically using javascript, there's not much it can do. There are various options when faced with this problem:
* Use a headless browser such as [webloop][].
* Use a Go javascript parser package, such as [otto][].
You can find a code example using `otto` [in this gist][exotto]. Thanks to github user @cryptix.
## For Loop
If all you need is a normal `for` loop over all nodes in the current selection, where `Map/Each`-style iteration is not necessary, you can use the following:
```
sel := Doc().Find(".selector")
for i := range sel.Nodes {
single := sel.Eq(i)
// use `single` as a selection of 1 node
}
```
Thanks to github user @jmoiron.
[webloop]: https://github.com/sourcegraph/webloop
[otto]: https://github.com/robertkrimen/otto
[exotto]: https://gist.github.com/cryptix/87127f76a94183747b53
[iconv]: http://godoc.org/?q=iconv
[text]: https://godoc.org/golang.org/x/text/encoding

30
vendor/src/github.com/PuerkitoBio/goquery/example_test.go

@ -1,30 +0,0 @@
package goquery_test
import (
"fmt"
"log"
"github.com/PuerkitoBio/goquery"
)
// This example scrapes the reviews shown on the home page of metalsucks.net.
func Example() {
// Load the HTML document
doc, err := goquery.NewDocument("http://metalsucks.net")
if err != nil {
log.Fatal(err)
}
// Find the review items
doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) {
// For each item found, get the band and title
band := s.Find("a").Text()
title := s.Find("i").Text()
fmt.Printf("Review %d: %s - %s\n", i, band, title)
})
// To see the output of the Example while running the test suite (go test), simply
// remove the leading "x" before Output on the next line. This will cause the
// example to fail (all the "real" tests should pass).
// xOutput: voluntarily fail the Example output.
}

46
vendor/src/github.com/PuerkitoBio/goquery/expand.go

@ -1,46 +0,0 @@
package goquery
import "golang.org/x/net/html"
// Add adds the selector string's matching nodes to those in the current
// selection and returns a new Selection object.
// The selector string is run in the context of the document of the current
// Selection object.
func (s *Selection) Add(selector string) *Selection {
return s.AddNodes(findWithMatcher([]*html.Node{s.document.rootNode}, compileMatcher(selector))...)
}
// AddMatcher adds the matcher's matching nodes to those in the current
// selection and returns a new Selection object.
// The matcher is run in the context of the document of the current
// Selection object.
func (s *Selection) AddMatcher(m Matcher) *Selection {
return s.AddNodes(findWithMatcher([]*html.Node{s.document.rootNode}, m)...)
}
// AddSelection adds the specified Selection object's nodes to those in the
// current selection and returns a new Selection object.
func (s *Selection) AddSelection(sel *Selection) *Selection {
if sel == nil {
return s.AddNodes()
}
return s.AddNodes(sel.Nodes...)
}
// Union is an alias for AddSelection.
func (s *Selection) Union(sel *Selection) *Selection {
return s.AddSelection(sel)
}
// AddNodes adds the specified nodes to those in the
// current selection and returns a new Selection object.
func (s *Selection) AddNodes(nodes ...*html.Node) *Selection {
return pushStack(s, appendWithoutDuplicates(s.Nodes, nodes, nil))
}
// AndSelf adds the previous set of elements on the stack to the current set.
// It returns a new Selection object containing the current Selection combined
// with the previous one.
func (s *Selection) AndSelf() *Selection {
return s.AddSelection(s.prevSel)
}

96
vendor/src/github.com/PuerkitoBio/goquery/expand_test.go

@ -1,96 +0,0 @@
package goquery
import (
"testing"
)
func TestAdd(t *testing.T) {
sel := Doc().Find("div.row-fluid").Add("a")
assertLength(t, sel.Nodes, 19)
}
func TestAddInvalid(t *testing.T) {
sel1 := Doc().Find("div.row-fluid")
sel2 := sel1.Add("")
assertLength(t, sel1.Nodes, 9)
assertLength(t, sel2.Nodes, 9)
if sel1 == sel2 {
t.Errorf("selections should not be the same")
}
}
func TestAddRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Add("a").End()
assertEqual(t, sel, sel2)
}
func TestAddSelection(t *testing.T) {
sel := Doc().Find("div.row-fluid")
sel2 := Doc().Find("a")
sel = sel.AddSelection(sel2)
assertLength(t, sel.Nodes, 19)
}
func TestAddSelectionNil(t *testing.T) {
sel := Doc().Find("div.row-fluid")
assertLength(t, sel.Nodes, 9)
sel = sel.AddSelection(nil)
assertLength(t, sel.Nodes, 9)
}
func TestAddSelectionRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Find("a")
sel2 = sel.AddSelection(sel2).End()
assertEqual(t, sel, sel2)
}
func TestAddNodes(t *testing.T) {
sel := Doc().Find("div.pvk-gutter")
sel2 := Doc().Find(".pvk-content")
sel = sel.AddNodes(sel2.Nodes...)
assertLength(t, sel.Nodes, 9)
}
func TestAddNodesNone(t *testing.T) {
sel := Doc().Find("div.pvk-gutter").AddNodes()
assertLength(t, sel.Nodes, 6)
}
func TestAddNodesRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Find("a")
sel2 = sel.AddNodes(sel2.Nodes...).End()
assertEqual(t, sel, sel2)
}
func TestAddNodesBig(t *testing.T) {
doc := DocW()
sel := doc.Find("li")
assertLength(t, sel.Nodes, 373)
sel2 := doc.Find("xyz")
assertLength(t, sel2.Nodes, 0)
nodes := sel.Nodes
sel2 = sel2.AddNodes(nodes...)
assertLength(t, sel2.Nodes, 373)
nodes2 := append(nodes, nodes...)
sel2 = sel2.End().AddNodes(nodes2...)
assertLength(t, sel2.Nodes, 373)
nodes3 := append(nodes2, nodes...)
sel2 = sel2.End().AddNodes(nodes3...)
assertLength(t, sel2.Nodes, 373)
}
func TestAndSelf(t *testing.T) {
sel := Doc().Find(".span12").Last().AndSelf()
assertLength(t, sel.Nodes, 2)
}
func TestAndSelfRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Find("a").AndSelf().End().End()
assertEqual(t, sel, sel2)
}

163
vendor/src/github.com/PuerkitoBio/goquery/filter.go

@ -1,163 +0,0 @@
package goquery
import "golang.org/x/net/html"
// Filter reduces the set of matched elements to those that match the selector string.
// It returns a new Selection object for this subset of matching elements.
func (s *Selection) Filter(selector string) *Selection {
return s.FilterMatcher(compileMatcher(selector))
}
// FilterMatcher reduces the set of matched elements to those that match
// the given matcher. It returns a new Selection object for this subset
// of matching elements.
func (s *Selection) FilterMatcher(m Matcher) *Selection {
return pushStack(s, winnow(s, m, true))
}
// Not removes elements from the Selection that match the selector string.
// It returns a new Selection object with the matching elements removed.
func (s *Selection) Not(selector string) *Selection {
return s.NotMatcher(compileMatcher(selector))
}
// NotMatcher removes elements from the Selection that match the given matcher.
// It returns a new Selection object with the matching elements removed.
func (s *Selection) NotMatcher(m Matcher) *Selection {
return pushStack(s, winnow(s, m, false))
}
// FilterFunction reduces the set of matched elements to those that pass the function's test.
// It returns a new Selection object for this subset of elements.
func (s *Selection) FilterFunction(f func(int, *Selection) bool) *Selection {
return pushStack(s, winnowFunction(s, f, true))
}
// NotFunction removes elements from the Selection that pass the function's test.
// It returns a new Selection object with the matching elements removed.
func (s *Selection) NotFunction(f func(int, *Selection) bool) *Selection {
return pushStack(s, winnowFunction(s, f, false))
}
// FilterNodes reduces the set of matched elements to those that match the specified nodes.
// It returns a new Selection object for this subset of elements.
func (s *Selection) FilterNodes(nodes ...*html.Node) *Selection {
return pushStack(s, winnowNodes(s, nodes, true))
}
// NotNodes removes elements from the Selection that match the specified nodes.
// It returns a new Selection object with the matching elements removed.
func (s *Selection) NotNodes(nodes ...*html.Node) *Selection {
return pushStack(s, winnowNodes(s, nodes, false))
}
// FilterSelection reduces the set of matched elements to those that match a
// node in the specified Selection object.
// It returns a new Selection object for this subset of elements.
func (s *Selection) FilterSelection(sel *Selection) *Selection {
if sel == nil {
return pushStack(s, winnowNodes(s, nil, true))
}
return pushStack(s, winnowNodes(s, sel.Nodes, true))
}
// NotSelection removes elements from the Selection that match a node in the specified
// Selection object. It returns a new Selection object with the matching elements removed.
func (s *Selection) NotSelection(sel *Selection) *Selection {
if sel == nil {
return pushStack(s, winnowNodes(s, nil, false))
}
return pushStack(s, winnowNodes(s, sel.Nodes, false))
}
// Intersection is an alias for FilterSelection.
func (s *Selection) Intersection(sel *Selection) *Selection {
return s.FilterSelection(sel)
}
// Has reduces the set of matched elements to those that have a descendant
// that matches the selector.
// It returns a new Selection object with the matching elements.
func (s *Selection) Has(selector string) *Selection {
return s.HasSelection(s.document.Find(selector))
}
// HasMatcher reduces the set of matched elements to those that have a descendant
// that matches the matcher.
// It returns a new Selection object with the matching elements.
func (s *Selection) HasMatcher(m Matcher) *Selection {
return s.HasSelection(s.document.FindMatcher(m))
}
// HasNodes reduces the set of matched elements to those that have a
// descendant that matches one of the nodes.
// It returns a new Selection object with the matching elements.
func (s *Selection) HasNodes(nodes ...*html.Node) *Selection {
return s.FilterFunction(func(_ int, sel *Selection) bool {
// Add all nodes that contain one of the specified nodes
for _, n := range nodes {
if sel.Contains(n) {
return true
}
}
return false
})
}
// HasSelection reduces the set of matched elements to those that have a
// descendant that matches one of the nodes of the specified Selection object.
// It returns a new Selection object with the matching elements.
func (s *Selection) HasSelection(sel *Selection) *Selection {
if sel == nil {
return s.HasNodes()
}
return s.HasNodes(sel.Nodes...)
}
// End ends the most recent filtering operation in the current chain and
// returns the set of matched elements to its previous state.
func (s *Selection) End() *Selection {
if s.prevSel != nil {
return s.prevSel
}
return newEmptySelection(s.document)
}
// Filter based on the matcher, and the indicator to keep (Filter) or
// to get rid of (Not) the matching elements.
func winnow(sel *Selection, m Matcher, keep bool) []*html.Node {
// Optimize if keep is requested
if keep {
return m.Filter(sel.Nodes)
}
// Use grep
return grep(sel, func(i int, s *Selection) bool {
return !m.Match(s.Get(0))
})
}
// Filter based on an array of nodes, and the indicator to keep (Filter) or
// to get rid of (Not) the matching elements.
func winnowNodes(sel *Selection, nodes []*html.Node, keep bool) []*html.Node {
if len(nodes)+len(sel.Nodes) < minNodesForSet {
return grep(sel, func(i int, s *Selection) bool {
return isInSlice(nodes, s.Get(0)) == keep
})
}
set := make(map[*html.Node]bool)
for _, n := range nodes {
set[n] = true
}
return grep(sel, func(i int, s *Selection) bool {
return set[s.Get(0)] == keep
})
}
// Filter based on a function test, and the indicator to keep (Filter) or
// to get rid of (Not) the matching elements.
func winnowFunction(sel *Selection, f func(int, *Selection) bool, keep bool) []*html.Node {
return grep(sel, func(i int, s *Selection) bool {
return f(i, s) == keep
})
}

206
vendor/src/github.com/PuerkitoBio/goquery/filter_test.go

@ -1,206 +0,0 @@
package goquery
import (
"testing"
)
func TestFilter(t *testing.T) {
sel := Doc().Find(".span12").Filter(".alert")
assertLength(t, sel.Nodes, 1)
}
func TestFilterNone(t *testing.T) {
sel := Doc().Find(".span12").Filter(".zzalert")
assertLength(t, sel.Nodes, 0)
}
func TestFilterInvalid(t *testing.T) {
sel := Doc().Find(".span12").Filter("")
assertLength(t, sel.Nodes, 0)
}
func TestFilterRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.Filter(".alert").End()
assertEqual(t, sel, sel2)
}
func TestFilterFunction(t *testing.T) {
sel := Doc().Find(".pvk-content").FilterFunction(func(i int, s *Selection) bool {
return i > 0
})
assertLength(t, sel.Nodes, 2)
}
func TestFilterFunctionRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.FilterFunction(func(i int, s *Selection) bool {
return i > 0
}).End()
assertEqual(t, sel, sel2)
}
func TestFilterNode(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.FilterNodes(sel.Nodes[2])
assertLength(t, sel2.Nodes, 1)
}
func TestFilterNodeRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.FilterNodes(sel.Nodes[2]).End()
assertEqual(t, sel, sel2)
}
func TestFilterSelection(t *testing.T) {
sel := Doc().Find(".link")
sel2 := Doc().Find("a[ng-click]")
sel3 := sel.FilterSelection(sel2)
assertLength(t, sel3.Nodes, 1)
}
func TestFilterSelectionRollback(t *testing.T) {
sel := Doc().Find(".link")
sel2 := Doc().Find("a[ng-click]")
sel2 = sel.FilterSelection(sel2).End()
assertEqual(t, sel, sel2)
}
func TestFilterSelectionNil(t *testing.T) {
var sel2 *Selection
sel := Doc().Find(".link")
sel3 := sel.FilterSelection(sel2)
assertLength(t, sel3.Nodes, 0)
}
func TestNot(t *testing.T) {
sel := Doc().Find(".span12").Not(".alert")
assertLength(t, sel.Nodes, 1)
}
func TestNotInvalid(t *testing.T) {
sel := Doc().Find(".span12").Not("")
assertLength(t, sel.Nodes, 2)
}
func TestNotRollback(t *testing.T) {
sel := Doc().Find(".span12")
sel2 := sel.Not(".alert").End()
assertEqual(t, sel, sel2)
}
func TestNotNone(t *testing.T) {
sel := Doc().Find(".span12").Not(".zzalert")
assertLength(t, sel.Nodes, 2)
}
func TestNotFunction(t *testing.T) {
sel := Doc().Find(".pvk-content").NotFunction(func(i int, s *Selection) bool {
return i > 0
})
assertLength(t, sel.Nodes, 1)
}
func TestNotFunctionRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.NotFunction(func(i int, s *Selection) bool {
return i > 0
}).End()
assertEqual(t, sel, sel2)
}
func TestNotNode(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.NotNodes(sel.Nodes[2])
assertLength(t, sel2.Nodes, 2)
}
func TestNotNodeRollback(t *testing.T) {
sel := Doc().Find(".pvk-content")
sel2 := sel.NotNodes(sel.Nodes[2]).End()
assertEqual(t, sel, sel2)
}
func TestNotSelection(t *testing.T) {
sel := Doc().Find(".link")
sel2 := Doc().Find("a[ng-click]")
sel3 := sel.NotSelection(sel2)
assertLength(t, sel3.Nodes, 6)
}
func TestNotSelectionRollback(t *testing.T) {
sel := Doc().Find(".link")
sel2 := Doc().Find("a[ng-click]")
sel2 = sel.NotSelection(sel2).End()
assertEqual(t, sel, sel2)
}
func TestIntersection(t *testing.T) {
sel := Doc().Find(".pvk-gutter")
sel2 := Doc().Find("div").Intersection(sel)
assertLength(t, sel2.Nodes, 6)
}
func TestIntersectionRollback(t *testing.T) {
sel := Doc().Find(".pvk-gutter")
sel2 := Doc().Find("div")
sel2 = sel.Intersection(sel2).End()
assertEqual(t, sel, sel2)
}
func TestHas(t *testing.T) {
sel := Doc().Find(".container-fluid").Has(".center-content")
assertLength(t, sel.Nodes, 2)
// Has() returns the high-level .container-fluid div, and the one that is the immediate parent of center-content
}
func TestHasInvalid(t *testing.T) {
sel := Doc().Find(".container-fluid").Has("")
assertLength(t, sel.Nodes, 0)
}
func TestHasRollback(t *testing.T) {
sel := Doc().Find(".container-fluid")
sel2 := sel.Has(".center-content").End()
assertEqual(t, sel, sel2)
}
func TestHasNodes(t *testing.T) {
sel := Doc().Find(".container-fluid")
sel2 := Doc().Find(".center-content")
sel = sel.HasNodes(sel2.Nodes...)
assertLength(t, sel.Nodes, 2)
// Has() returns the high-level .container-fluid div, and the one that is the immediate parent of center-content
}
func TestHasNodesRollback(t *testing.T) {
sel := Doc().Find(".container-fluid")
sel2 := Doc().Find(".center-content")
sel2 = sel.HasNodes(sel2.Nodes...).End()
assertEqual(t, sel, sel2)
}
func TestHasSelection(t *testing.T) {
sel := Doc().Find("p")
sel2 := Doc().Find("small")
sel = sel.HasSelection(sel2)
assertLength(t, sel.Nodes, 1)
}
func TestHasSelectionRollback(t *testing.T) {
sel := Doc().Find("p")
sel2 := Doc().Find("small")
sel2 = sel.HasSelection(sel2).End()
assertEqual(t, sel, sel2)
}
func TestEnd(t *testing.T) {
sel := Doc().Find("p").Has("small").End()
assertLength(t, sel.Nodes, 4)
}
func TestEndToTop(t *testing.T) {
sel := Doc().Find("p").Has("small").End().End().End()
assertLength(t, sel.Nodes, 0)
}

39
vendor/src/github.com/PuerkitoBio/goquery/iteration.go

@ -1,39 +0,0 @@
package goquery
// Each iterates over a Selection object, executing a function for each
// matched element. It returns the current Selection object. The function
// f is called for each element in the selection with the index of the
// element in that selection starting at 0, and a *Selection that contains
// only that element.
func (s *Selection) Each(f func(int, *Selection)) *Selection {
for i, n := range s.Nodes {
f(i, newSingleSelection(n, s.document))
}
return s
}
// EachWithBreak iterates over a Selection object, executing a function for each
// matched element. It is identical to Each except that it is possible to break
// out of the loop by returning false in the callback function. It returns the
// current Selection object.
func (s *Selection) EachWithBreak(f func(int, *Selection) bool) *Selection {
for i, n := range s.Nodes {
if !f(i, newSingleSelection(n, s.document)) {
return s
}
}
return s
}
// Map passes each element in the current matched set through a function,
// producing a slice of string holding the returned values. The function
// f is called for each element in the selection with the index of the
// element in that selection starting at 0, and a *Selection that contains
// only that element.
func (s *Selection) Map(f func(int, *Selection) string) (result []string) {
for i, n := range s.Nodes {
result = append(result, f(i, newSingleSelection(n, s.document)))
}
return result
}

88
vendor/src/github.com/PuerkitoBio/goquery/iteration_test.go

@ -1,88 +0,0 @@
package goquery
import (
"testing"
"golang.org/x/net/html"
)
func TestEach(t *testing.T) {
var cnt int
sel := Doc().Find(".hero-unit .row-fluid").Each(func(i int, n *Selection) {
cnt++
t.Logf("At index %v, node %v", i, n.Nodes[0].Data)
}).Find("a")
if cnt != 4 {
t.Errorf("Expected Each() to call function 4 times, got %v times.", cnt)
}
assertLength(t, sel.Nodes, 6)
}
func TestEachWithBreak(t *testing.T) {
var cnt int
sel := Doc().Find(".hero-unit .row-fluid").EachWithBreak(func(i int, n *Selection) bool {
cnt++
t.Logf("At index %v, node %v", i, n.Nodes[0].Data)
return false
}).Find("a")
if cnt != 1 {
t.Errorf("Expected Each() to call function 1 time, got %v times.", cnt)
}
assertLength(t, sel.Nodes, 6)
}
func TestEachEmptySelection(t *testing.T) {
var cnt int
sel := Doc().Find("zzzz")
sel.Each(func(i int, n *Selection) {
cnt++
})
if cnt > 0 {
t.Error("Expected Each() to not be called on empty Selection.")
}
sel2 := sel.Find("div")
assertLength(t, sel2.Nodes, 0)
}
func TestMap(t *testing.T) {
sel := Doc().Find(".pvk-content")
vals := sel.Map(func(i int, s *Selection) string {
n := s.Get(0)
if n.Type == html.ElementNode {
return n.Data
}
return ""
})
for _, v := range vals {
if v != "div" {
t.Error("Expected Map array result to be all 'div's.")
}
}
if len(vals) != 3 {
t.Errorf("Expected Map array result to have a length of 3, found %v.", len(vals))
}
}
func TestForRange(t *testing.T) {
sel := Doc().Find(".pvk-content")
initLen := sel.Length()
for i := range sel.Nodes {
single := sel.Eq(i)
//h, err := single.Html()
//if err != nil {
// t.Fatal(err)
//}
//fmt.Println(i, h)
if single.Length() != 1 {
t.Errorf("%d: expected length of 1, got %d", i, single.Length())
}
}
if sel.Length() != initLen {
t.Errorf("expected initial selection to still have length %d, got %d", initLen, sel.Length())
}
}

550
vendor/src/github.com/PuerkitoBio/goquery/manipulation.go

@ -1,550 +0,0 @@
package goquery
import (
"strings"
"golang.org/x/net/html"
)
// After applies the selector from the root document and inserts the matched elements
// after the elements in the set of matched elements.
//
// If one of the matched elements in the selection is not currently in the
// document, it's impossible to insert nodes after it, so it will be ignored.
//
// This follows the same rules as Selection.Append.
func (s *Selection) After(selector string) *Selection {
return s.AfterMatcher(compileMatcher(selector))
}
// AfterMatcher applies the matcher from the root document and inserts the matched elements
// after the elements in the set of matched elements.
//
// If one of the matched elements in the selection is not currently in the
// document, it's impossible to insert nodes after it, so it will be ignored.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AfterMatcher(m Matcher) *Selection {
return s.AfterNodes(m.MatchAll(s.document.rootNode)...)
}
// AfterSelection inserts the elements in the selection after each element in the set of matched
// elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AfterSelection(sel *Selection) *Selection {
return s.AfterNodes(sel.Nodes...)
}
// AfterHtml parses the html and inserts it after the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AfterHtml(html string) *Selection {
return s.AfterNodes(parseHtml(html)...)
}
// AfterNodes inserts the nodes after each element in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AfterNodes(ns ...*html.Node) *Selection {
return s.manipulateNodes(ns, true, func(sn *html.Node, n *html.Node) {
if sn.Parent != nil {
sn.Parent.InsertBefore(n, sn.NextSibling)
}
})
}
// Append appends the elements specified by the selector to the end of each element
// in the set of matched elements, following those rules:
//
// 1) The selector is applied to the root document.
//
// 2) Elements that are part of the document will be moved to the new location.
//
// 3) If there are multiple locations to append to, cloned nodes will be
// appended to all target locations except the last one, which will be moved
// as noted in (2).
func (s *Selection) Append(selector string) *Selection {
return s.AppendMatcher(compileMatcher(selector))
}
// AppendMatcher appends the elements specified by the matcher to the end of each element
// in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AppendMatcher(m Matcher) *Selection {
return s.AppendNodes(m.MatchAll(s.document.rootNode)...)
}
// AppendSelection appends the elements in the selection to the end of each element
// in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AppendSelection(sel *Selection) *Selection {
return s.AppendNodes(sel.Nodes...)
}
// AppendHtml parses the html and appends it to the set of matched elements.
func (s *Selection) AppendHtml(html string) *Selection {
return s.AppendNodes(parseHtml(html)...)
}
// AppendNodes appends the specified nodes to each node in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) AppendNodes(ns ...*html.Node) *Selection {
return s.manipulateNodes(ns, false, func(sn *html.Node, n *html.Node) {
sn.AppendChild(n)
})
}
// Before inserts the matched elements before each element in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) Before(selector string) *Selection {
return s.BeforeMatcher(compileMatcher(selector))
}
// BeforeMatcher inserts the matched elements before each element in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) BeforeMatcher(m Matcher) *Selection {
return s.BeforeNodes(m.MatchAll(s.document.rootNode)...)
}
// BeforeSelection inserts the elements in the selection before each element in the set of matched
// elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) BeforeSelection(sel *Selection) *Selection {
return s.BeforeNodes(sel.Nodes...)
}
// BeforeHtml parses the html and inserts it before the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) BeforeHtml(html string) *Selection {
return s.BeforeNodes(parseHtml(html)...)
}
// BeforeNodes inserts the nodes before each element in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) BeforeNodes(ns ...*html.Node) *Selection {
return s.manipulateNodes(ns, false, func(sn *html.Node, n *html.Node) {
if sn.Parent != nil {
sn.Parent.InsertBefore(n, sn)
}
})
}
// Clone creates a deep copy of the set of matched nodes. The new nodes will not be
// attached to the document.
func (s *Selection) Clone() *Selection {
ns := newEmptySelection(s.document)
ns.Nodes = cloneNodes(s.Nodes)
return ns
}
// Empty removes all children nodes from the set of matched elements.
// It returns the children nodes in a new Selection.
func (s *Selection) Empty() *Selection {
var nodes []*html.Node
for _, n := range s.Nodes {
for c := n.FirstChild; c != nil; c = n.FirstChild {
n.RemoveChild(c)
nodes = append(nodes, c)
}
}
return pushStack(s, nodes)
}
// Prepend prepends the elements specified by the selector to each element in
// the set of matched elements, following the same rules as Append.
func (s *Selection) Prepend(selector string) *Selection {
return s.PrependMatcher(compileMatcher(selector))
}
// PrependMatcher prepends the elements specified by the matcher to each
// element in the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) PrependMatcher(m Matcher) *Selection {
return s.PrependNodes(m.MatchAll(s.document.rootNode)...)
}
// PrependSelection prepends the elements in the selection to each element in
// the set of matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) PrependSelection(sel *Selection) *Selection {
return s.PrependNodes(sel.Nodes...)
}
// PrependHtml parses the html and prepends it to the set of matched elements.
func (s *Selection) PrependHtml(html string) *Selection {
return s.PrependNodes(parseHtml(html)...)
}
// PrependNodes prepends the specified nodes to each node in the set of
// matched elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) PrependNodes(ns ...*html.Node) *Selection {
return s.manipulateNodes(ns, true, func(sn *html.Node, n *html.Node) {
// sn.FirstChild may be nil, in which case this functions like
// sn.AppendChild()
sn.InsertBefore(n, sn.FirstChild)
})
}
// Remove removes the set of matched elements from the document.
// It returns the same selection, now consisting of nodes not in the document.
func (s *Selection) Remove() *Selection {
for _, n := range s.Nodes {
if n.Parent != nil {
n.Parent.RemoveChild(n)
}
}
return s
}
// RemoveFiltered removes the set of matched elements by selector.
// It returns the Selection of removed nodes.
func (s *Selection) RemoveFiltered(selector string) *Selection {
return s.RemoveMatcher(compileMatcher(selector))
}
// RemoveMatcher removes the set of matched elements.
// It returns the Selection of removed nodes.
func (s *Selection) RemoveMatcher(m Matcher) *Selection {
return s.FilterMatcher(m).Remove()
}
// ReplaceWith replaces each element in the set of matched elements with the
// nodes matched by the given selector.
// It returns the removed elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) ReplaceWith(selector string) *Selection {
return s.ReplaceWithMatcher(compileMatcher(selector))
}
// ReplaceWithMatcher replaces each element in the set of matched elements with
// the nodes matched by the given Matcher.
// It returns the removed elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) ReplaceWithMatcher(m Matcher) *Selection {
return s.ReplaceWithNodes(m.MatchAll(s.document.rootNode)...)
}
// ReplaceWithSelection replaces each element in the set of matched elements with
// the nodes from the given Selection.
// It returns the removed elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) ReplaceWithSelection(sel *Selection) *Selection {
return s.ReplaceWithNodes(sel.Nodes...)
}
// ReplaceWithHtml replaces each element in the set of matched elements with
// the parsed HTML.
// It returns the removed elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) ReplaceWithHtml(html string) *Selection {
return s.ReplaceWithNodes(parseHtml(html)...)
}
// ReplaceWithNodes replaces each element in the set of matched elements with
// the given nodes.
// It returns the removed elements.
//
// This follows the same rules as Selection.Append.
func (s *Selection) ReplaceWithNodes(ns ...*html.Node) *Selection {
s.AfterNodes(ns...)
return s.Remove()
}
// Unwrap removes the parents of the set of matched elements, leaving the matched
// elements (and their siblings, if any) in their place.
// It returns the original selection.
func (s *Selection) Unwrap() *Selection {
s.Parent().Each(func(i int, ss *Selection) {
// For some reason, jquery allows unwrap to remove the <head> element, so
// allowing it here too. Same for <html>. Why it allows those elements to
// be unwrapped while not allowing body is a mystery to me.
if ss.Nodes[0].Data != "body" {
ss.ReplaceWithSelection(ss.Contents())
}
})
return s
}
// Wrap wraps each element in the set of matched elements inside the first
// element matched by the given selector. The matched child is cloned before
// being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) Wrap(selector string) *Selection {
return s.WrapMatcher(compileMatcher(selector))
}
// WrapMatcher wraps each element in the set of matched elements inside the
// first element matched by the given matcher. The matched child is cloned
// before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapMatcher(m Matcher) *Selection {
return s.wrapNodes(m.MatchAll(s.document.rootNode)...)
}
// WrapSelection wraps each element in the set of matched elements inside the
// first element in the given Selection. The element is cloned before being
// inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapSelection(sel *Selection) *Selection {
return s.wrapNodes(sel.Nodes...)
}
// WrapHtml wraps each element in the set of matched elements inside the inner-
// most child of the given HTML.
//
// It returns the original set of elements.
func (s *Selection) WrapHtml(html string) *Selection {
return s.wrapNodes(parseHtml(html)...)
}
// WrapNode wraps each element in the set of matched elements inside the inner-
// most child of the given node. The given node is copied before being inserted
// into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapNode(n *html.Node) *Selection {
return s.wrapNodes(n)
}
func (s *Selection) wrapNodes(ns ...*html.Node) *Selection {
s.Each(func(i int, ss *Selection) {
ss.wrapAllNodes(ns...)
})
return s
}
// WrapAll wraps a single HTML structure, matched by the given selector, around
// all elements in the set of matched elements. The matched child is cloned
// before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapAll(selector string) *Selection {
return s.WrapAllMatcher(compileMatcher(selector))
}
// WrapAllMatcher wraps a single HTML structure, matched by the given Matcher,
// around all elements in the set of matched elements. The matched child is
// cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapAllMatcher(m Matcher) *Selection {
return s.wrapAllNodes(m.MatchAll(s.document.rootNode)...)
}
// WrapAllSelection wraps a single HTML structure, the first node of the given
// Selection, around all elements in the set of matched elements. The matched
// child is cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapAllSelection(sel *Selection) *Selection {
return s.wrapAllNodes(sel.Nodes...)
}
// WrapAllHtml wraps the given HTML structure around all elements in the set of
// matched elements. The matched child is cloned before being inserted into the
// document.
//
// It returns the original set of elements.
func (s *Selection) WrapAllHtml(html string) *Selection {
return s.wrapAllNodes(parseHtml(html)...)
}
func (s *Selection) wrapAllNodes(ns ...*html.Node) *Selection {
if len(ns) > 0 {
return s.WrapAllNode(ns[0])
}
return s
}
// WrapAllNode wraps the given node around the first element in the Selection,
// making all other nodes in the Selection children of the given node. The node
// is cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapAllNode(n *html.Node) *Selection {
if s.Size() == 0 {
return s
}
wrap := cloneNode(n)
first := s.Nodes[0]
if first.Parent != nil {
first.Parent.InsertBefore(wrap, first)
first.Parent.RemoveChild(first)
}
for c := getFirstChildEl(wrap); c != nil; c = getFirstChildEl(wrap) {
wrap = c
}
newSingleSelection(wrap, s.document).AppendSelection(s)
return s
}
// WrapInner wraps an HTML structure, matched by the given selector, around the
// content of element in the set of matched elements. The matched child is
// cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapInner(selector string) *Selection {
return s.WrapInnerMatcher(compileMatcher(selector))
}
// WrapInnerMatcher wraps an HTML structure, matched by the given selector,
// around the content of element in the set of matched elements. The matched
// child is cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapInnerMatcher(m Matcher) *Selection {
return s.wrapInnerNodes(m.MatchAll(s.document.rootNode)...)
}
// WrapInnerSelection wraps an HTML structure, matched by the given selector,
// around the content of element in the set of matched elements. The matched
// child is cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapInnerSelection(sel *Selection) *Selection {
return s.wrapInnerNodes(sel.Nodes...)
}
// WrapInnerHtml wraps an HTML structure, matched by the given selector, around
// the content of element in the set of matched elements. The matched child is
// cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapInnerHtml(html string) *Selection {
return s.wrapInnerNodes(parseHtml(html)...)
}
// WrapInnerNode wraps an HTML structure, matched by the given selector, around
// the content of element in the set of matched elements. The matched child is
// cloned before being inserted into the document.
//
// It returns the original set of elements.
func (s *Selection) WrapInnerNode(n *html.Node) *Selection {
return s.wrapInnerNodes(n)
}
func (s *Selection) wrapInnerNodes(ns ...*html.Node) *Selection {
if len(ns) == 0 {
return s
}
s.Each(func(i int, s *Selection) {
contents := s.Contents()
if contents.Size() > 0 {
contents.wrapAllNodes(ns...)
} else {
s.AppendNodes(cloneNode(ns[0]))
}
})
return s
}
func parseHtml(h string) []*html.Node {
// Errors are only returned when the io.Reader returns any error besides
// EOF, but strings.Reader never will
nodes, err := html.ParseFragment(strings.NewReader(h), &html.Node{Type: html.ElementNode})
if err != nil {
panic("goquery: failed to parse HTML: " + err.Error())
}
return nodes
}
// Get the first child that is an ElementNode
func getFirstChildEl(n *html.Node) *html.Node {
c := n.FirstChild
for c != nil && c.Type != html.ElementNode {
c = c.NextSibling
}
return c
}
// Deep copy a slice of nodes.
func cloneNodes(ns []*html.Node) []*html.Node {
cns := make([]*html.Node, 0, len(ns))
for _, n := range ns {
cns = append(cns, cloneNode(n))
}
return cns
}
// Deep copy a node. The new node has clones of all the original node's
// children but none of its parents or siblings.
func cloneNode(n *html.Node) *html.Node {
nn := &html.Node{
Type: n.Type,
DataAtom: n.DataAtom,
Data: n.Data,
Attr: make([]html.Attribute, len(n.Attr)),
}
copy(nn.Attr, n.Attr)
for c := n.FirstChild; c != nil; c = c.NextSibling {
nn.AppendChild(cloneNode(c))
}
return nn
}
func (s *Selection) manipulateNodes(ns []*html.Node, reverse bool,
f func(sn *html.Node, n *html.Node)) *Selection {
lasti := s.Size() - 1
// net.Html doesn't provide document fragments for insertion, so to get
// things in the correct order with After() and Prepend(), the callback
// needs to be called on the reverse of the nodes.
if reverse {
for i, j := 0, len(ns)-1; i < j; i, j = i+1, j-1 {
ns[i], ns[j] = ns[j], ns[i]
}
}
for i, sn := range s.Nodes {
for _, n := range ns {
if i != lasti {
f(sn, cloneNode(n))
} else {
if n.Parent != nil {
n.Parent.RemoveChild(n)
}
f(sn, n)
}
}
}
return s
}

453
vendor/src/github.com/PuerkitoBio/goquery/manipulation_test.go

@ -1,453 +0,0 @@
package goquery
import (
"testing"
)
const (
wrapHtml = "<div id=\"ins\">test string<div><p><em><b></b></em></p></div></div>"
)
func TestAfter(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").After("#nf6")
assertLength(t, doc.Find("#main #nf6").Nodes, 0)
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("#main + #nf6").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAfterMany(t *testing.T) {
doc := Doc2Clone()
doc.Find(".one").After("#nf6")
assertLength(t, doc.Find("#foot #nf6").Nodes, 1)
assertLength(t, doc.Find("#main #nf6").Nodes, 1)
assertLength(t, doc.Find(".one + #nf6").Nodes, 2)
printSel(t, doc.Selection)
}
func TestAfterWithRemoved(t *testing.T) {
doc := Doc2Clone()
s := doc.Find("#main").Remove()
s.After("#nf6")
assertLength(t, s.Find("#nf6").Nodes, 0)
assertLength(t, doc.Find("#nf6").Nodes, 0)
printSel(t, doc.Selection)
}
func TestAfterSelection(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").AfterSelection(doc.Find("#nf1, #nf2"))
assertLength(t, doc.Find("#main #nf1, #main #nf2").Nodes, 0)
assertLength(t, doc.Find("#foot #nf1, #foot #nf2").Nodes, 0)
assertLength(t, doc.Find("#main + #nf1, #nf1 + #nf2").Nodes, 2)
printSel(t, doc.Selection)
}
func TestAfterHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").AfterHtml("<strong>new node</strong>")
assertLength(t, doc.Find("#main + strong").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAppend(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").Append("#nf6")
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("#main #nf6").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAppendBody(t *testing.T) {
doc := Doc2Clone()
doc.Find("body").Append("#nf6")
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("#main #nf6").Nodes, 0)
assertLength(t, doc.Find("body > #nf6").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAppendSelection(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").AppendSelection(doc.Find("#nf1, #nf2"))
assertLength(t, doc.Find("#foot #nf1").Nodes, 0)
assertLength(t, doc.Find("#foot #nf2").Nodes, 0)
assertLength(t, doc.Find("#main #nf1").Nodes, 1)
assertLength(t, doc.Find("#main #nf2").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAppendSelectionExisting(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").AppendSelection(doc.Find("#n1, #n2"))
assertClass(t, doc.Find("#main :nth-child(1)"), "three")
assertClass(t, doc.Find("#main :nth-child(5)"), "one")
assertClass(t, doc.Find("#main :nth-child(6)"), "two")
printSel(t, doc.Selection)
}
func TestAppendClone(t *testing.T) {
doc := Doc2Clone()
doc.Find("#n1").AppendSelection(doc.Find("#nf1").Clone())
assertLength(t, doc.Find("#foot #nf1").Nodes, 1)
assertLength(t, doc.Find("#main #nf1").Nodes, 1)
printSel(t, doc.Selection)
}
func TestAppendHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("div").AppendHtml("<strong>new node</strong>")
assertLength(t, doc.Find("strong").Nodes, 14)
printSel(t, doc.Selection)
}
func TestBefore(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").Before("#nf6")
assertLength(t, doc.Find("#main #nf6").Nodes, 0)
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("body > #nf6:first-child").Nodes, 1)
printSel(t, doc.Selection)
}
func TestBeforeWithRemoved(t *testing.T) {
doc := Doc2Clone()
s := doc.Find("#main").Remove()
s.Before("#nf6")
assertLength(t, s.Find("#nf6").Nodes, 0)
assertLength(t, doc.Find("#nf6").Nodes, 0)
printSel(t, doc.Selection)
}
func TestBeforeSelection(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").BeforeSelection(doc.Find("#nf1, #nf2"))
assertLength(t, doc.Find("#main #nf1, #main #nf2").Nodes, 0)
assertLength(t, doc.Find("#foot #nf1, #foot #nf2").Nodes, 0)
assertLength(t, doc.Find("body > #nf1:first-child, #nf1 + #nf2").Nodes, 2)
printSel(t, doc.Selection)
}
func TestBeforeHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").BeforeHtml("<strong>new node</strong>")
assertLength(t, doc.Find("body > strong:first-child").Nodes, 1)
printSel(t, doc.Selection)
}
func TestEmpty(t *testing.T) {
doc := Doc2Clone()
s := doc.Find("#main").Empty()
assertLength(t, doc.Find("#main").Children().Nodes, 0)
assertLength(t, s.Filter("div").Nodes, 6)
printSel(t, doc.Selection)
}
func TestPrepend(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").Prepend("#nf6")
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("#main #nf6:first-child").Nodes, 1)
printSel(t, doc.Selection)
}
func TestPrependBody(t *testing.T) {
doc := Doc2Clone()
doc.Find("body").Prepend("#nf6")
assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
assertLength(t, doc.Find("#main #nf6").Nodes, 0)
assertLength(t, doc.Find("body > #nf6:first-child").Nodes, 1)
printSel(t, doc.Selection)
}
func TestPrependSelection(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").PrependSelection(doc.Find("#nf1, #nf2"))
assertLength(t, doc.Find("#foot #nf1").Nodes, 0)
assertLength(t, doc.Find("#foot #nf2").Nodes, 0)
assertLength(t, doc.Find("#main #nf1:first-child").Nodes, 1)
assertLength(t, doc.Find("#main #nf2:nth-child(2)").Nodes, 1)
printSel(t, doc.Selection)
}
func TestPrependSelectionExisting(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").PrependSelection(doc.Find("#n5, #n6"))
assertClass(t, doc.Find("#main :nth-child(1)"), "five")
assertClass(t, doc.Find("#main :nth-child(2)"), "six")
assertClass(t, doc.Find("#main :nth-child(5)"), "three")
assertClass(t, doc.Find("#main :nth-child(6)"), "four")
printSel(t, doc.Selection)
}
func TestPrependClone(t *testing.T) {
doc := Doc2Clone()
doc.Find("#n1").PrependSelection(doc.Find("#nf1").Clone())
assertLength(t, doc.Find("#foot #nf1:first-child").Nodes, 1)
assertLength(t, doc.Find("#main #nf1:first-child").Nodes, 1)
printSel(t, doc.Selection)
}
func TestPrependHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("div").PrependHtml("<strong>new node</strong>")
assertLength(t, doc.Find("strong:first-child").Nodes, 14)
printSel(t, doc.Selection)
}
func TestRemove(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf1").Remove()
assertLength(t, doc.Find("#foot #nf1").Nodes, 0)
printSel(t, doc.Selection)
}
func TestRemoveAll(t *testing.T) {
doc := Doc2Clone()
doc.Find("*").Remove()
assertLength(t, doc.Find("*").Nodes, 0)
printSel(t, doc.Selection)
}
func TestRemoveRoot(t *testing.T) {
doc := Doc2Clone()
doc.Find("html").Remove()
assertLength(t, doc.Find("html").Nodes, 0)
printSel(t, doc.Selection)
}
func TestRemoveFiltered(t *testing.T) {
doc := Doc2Clone()
nf6 := doc.Find("#nf6")
s := doc.Find("div").RemoveFiltered("#nf6")
assertLength(t, doc.Find("#nf6").Nodes, 0)
assertLength(t, s.Nodes, 1)
if nf6.Nodes[0] != s.Nodes[0] {
t.Error("Removed node does not match original")
}
printSel(t, doc.Selection)
}
func TestReplaceWith(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf6").ReplaceWith("#main")
assertLength(t, doc.Find("#foot #main:last-child").Nodes, 1)
printSel(t, doc.Selection)
doc.Find("#foot").ReplaceWith("#main")
assertLength(t, doc.Find("#foot").Nodes, 0)
assertLength(t, doc.Find("#main").Nodes, 1)
printSel(t, doc.Selection)
}
func TestReplaceWithHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main, #foot").ReplaceWithHtml("<div id=\"replace\"></div>")
assertLength(t, doc.Find("#replace").Nodes, 2)
printSel(t, doc.Selection)
}
func TestReplaceWithSelection(t *testing.T) {
doc := Doc2Clone()
sel := doc.Find("#nf6").ReplaceWithSelection(doc.Find("#nf5"))
assertSelectionIs(t, sel, "#nf6")
assertLength(t, doc.Find("#nf6").Nodes, 0)
assertLength(t, doc.Find("#nf5").Nodes, 1)
printSel(t, doc.Selection)
}
func TestUnwrap(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf5").Unwrap()
assertLength(t, doc.Find("#foot").Nodes, 0)
assertLength(t, doc.Find("body > #nf1").Nodes, 1)
assertLength(t, doc.Find("body > #nf5").Nodes, 1)
printSel(t, doc.Selection)
doc = Doc2Clone()
doc.Find("#nf5, #n1").Unwrap()
assertLength(t, doc.Find("#foot").Nodes, 0)
assertLength(t, doc.Find("#main").Nodes, 0)
assertLength(t, doc.Find("body > #n1").Nodes, 1)
assertLength(t, doc.Find("body > #nf5").Nodes, 1)
printSel(t, doc.Selection)
}
func TestUnwrapBody(t *testing.T) {
doc := Doc2Clone()
doc.Find("#main").Unwrap()
assertLength(t, doc.Find("body").Nodes, 1)
assertLength(t, doc.Find("body > #main").Nodes, 1)
printSel(t, doc.Selection)
}
func TestUnwrapHead(t *testing.T) {
doc := Doc2Clone()
doc.Find("title").Unwrap()
assertLength(t, doc.Find("head").Nodes, 0)
assertLength(t, doc.Find("head > title").Nodes, 0)
assertLength(t, doc.Find("title").Nodes, 1)
printSel(t, doc.Selection)
}
func TestUnwrapHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("head").Unwrap()
assertLength(t, doc.Find("html").Nodes, 0)
assertLength(t, doc.Find("html head").Nodes, 0)
assertLength(t, doc.Find("head").Nodes, 1)
printSel(t, doc.Selection)
}
func TestWrap(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf1").Wrap("#nf2")
nf1 := doc.Find("#foot #nf2 #nf1")
assertLength(t, nf1.Nodes, 1)
nf2 := doc.Find("#nf2")
assertLength(t, nf2.Nodes, 2)
printSel(t, doc.Selection)
}
func TestWrapEmpty(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf1").Wrap("#doesnt-exist")
origHtml, _ := Doc2().Html()
newHtml, _ := doc.Html()
if origHtml != newHtml {
t.Error("Expected the two documents to be identical.")
}
printSel(t, doc.Selection)
}
func TestWrapHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find(".odd").WrapHtml(wrapHtml)
nf2 := doc.Find("#ins #nf2")
assertLength(t, nf2.Nodes, 1)
printSel(t, doc.Selection)
}
func TestWrapSelection(t *testing.T) {
doc := Doc2Clone()
doc.Find("#nf1").WrapSelection(doc.Find("#nf2"))
nf1 := doc.Find("#foot #nf2 #nf1")
assertLength(t, nf1.Nodes, 1)
nf2 := doc.Find("#nf2")
assertLength(t, nf2.Nodes, 2)
printSel(t, doc.Selection)
}
func TestWrapAll(t *testing.T) {
doc := Doc2Clone()
doc.Find(".odd").WrapAll("#nf1")
nf1 := doc.Find("#main #nf1")
assertLength(t, nf1.Nodes, 1)
sel := nf1.Find("#n2 ~ #n4 ~ #n6 ~ #nf2 ~ #nf4 ~ #nf6")
assertLength(t, sel.Nodes, 1)
printSel(t, doc.Selection)
}
func TestWrapAllHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find(".odd").WrapAllHtml(wrapHtml)
nf1 := doc.Find("#main div#ins div p em b #n2 ~ #n4 ~ #n6 ~ #nf2 ~ #nf4 ~ #nf6")
assertLength(t, nf1.Nodes, 1)
printSel(t, doc.Selection)
}
func TestWrapInnerNoContent(t *testing.T) {
doc := Doc2Clone()
doc.Find(".one").WrapInner(".two")
twos := doc.Find(".two")
assertLength(t, twos.Nodes, 4)
assertLength(t, doc.Find(".one .two").Nodes, 2)
printSel(t, doc.Selection)
}
func TestWrapInnerWithContent(t *testing.T) {
doc := Doc3Clone()
doc.Find(".one").WrapInner(".two")
twos := doc.Find(".two")
assertLength(t, twos.Nodes, 4)
assertLength(t, doc.Find(".one .two").Nodes, 2)
printSel(t, doc.Selection)
}
func TestWrapInnerNoWrapper(t *testing.T) {
doc := Doc2Clone()
doc.Find(".one").WrapInner(".not-exist")
twos := doc.Find(".two")
assertLength(t, twos.Nodes, 2)
assertLength(t, doc.Find(".one").Nodes, 2)
assertLength(t, doc.Find(".one .two").Nodes, 0)
printSel(t, doc.Selection)
}
func TestWrapInnerHtml(t *testing.T) {
doc := Doc2Clone()
doc.Find("#foot").WrapInnerHtml(wrapHtml)
foot := doc.Find("#foot div#ins div p em b #nf1 ~ #nf2 ~ #nf3")
assertLength(t, foot.Nodes, 1)
printSel(t, doc.Selection)
}

52
vendor/src/github.com/PuerkitoBio/goquery/misc/git/pre-commit

@ -1,52 +0,0 @@
#!/bin/sh
echo ">>> golint"
for dir in $(go list ./... | grep -v /vendor/)
do
golint "${dir}"
done
echo "<<< golint"
echo
echo ">>> go vet"
go vet $(go list ./... | grep -v /vendor/)
echo "<<< go vet"
echo
echo ">>> gosimple"
gosimple $(go list ./... | grep -v /vendor/)
echo "<<< gosimple"
echo
echo ">>> staticcheck"
staticcheck $(go list ./... | grep -v /vendor/)
echo "<<< staticcheck"
echo
echo ">>> unused"
unused $(go list ./... | grep -v /vendor/)
echo "<<< unused"
echo
echo ">>> gas"
gas $(find . -name "*.go" | grep -v /vendor/ | grep -v '_test.go$')
echo "<<< gas"
echo
# Check for gofmt problems and report if any.
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v /vendor/)
[ -z "$gofiles" ] && echo "EXIT $vetres" && exit $vetres
if [ -n "$gofiles" ]; then
unformatted=$(gofmt -l $gofiles)
if [ -n "$unformatted" ]; then
# Some files are not gofmt'd.
echo >&2 "Go files must be formatted with gofmt. Please run:"
for fn in $unformatted; do
echo >&2 " gofmt -w $PWD/$fn"
done
fi
fi
echo

278
vendor/src/github.com/PuerkitoBio/goquery/property.go

@ -1,278 +0,0 @@
package goquery
import (
"bytes"
"regexp"
"strings"
"golang.org/x/net/html"
)
var rxClassTrim = regexp.MustCompile("[\t\r\n]")
// Attr gets the specified attribute's value for the first element in the
// Selection. To get the value for each element individually, use a looping
// construct such as Each or Map method.
func (s *Selection) Attr(attrName string) (val string, exists bool) {
if len(s.Nodes) == 0 {
return
}
return getAttributeValue(attrName, s.Nodes[0])
}
// AttrOr works like Attr but returns default value if attribute is not present.
func (s *Selection) AttrOr(attrName, defaultValue string) string {
if len(s.Nodes) == 0 {
return defaultValue
}
val, exists := getAttributeValue(attrName, s.Nodes[0])
if !exists {
return defaultValue
}
return val
}
// RemoveAttr removes the named attribute from each element in the set of matched elements.
func (s *Selection) RemoveAttr(attrName string) *Selection {
for _, n := range s.Nodes {
removeAttr(n, attrName)
}
return s
}
// SetAttr sets the given attribute on each element in the set of matched elements.
func (s *Selection) SetAttr(attrName, val string) *Selection {
for _, n := range s.Nodes {
attr := getAttributePtr(attrName, n)
if attr == nil {
n.Attr = append(n.Attr, html.Attribute{Key: attrName, Val: val})
} else {
attr.Val = val
}
}
return s
}
// Text gets the combined text contents of each element in the set of matched
// elements, including their descendants.
func (s *Selection) Text() string {
var buf bytes.Buffer
// Slightly optimized vs calling Each: no single selection object created
for _, n := range s.Nodes {
buf.WriteString(getNodeText(n))
}
return buf.String()
}
// Size is an alias for Length.
func (s *Selection) Size() int {
return s.Length()
}
// Length returns the number of elements in the Selection object.
func (s *Selection) Length() int {
return len(s.Nodes)
}
// Html gets the HTML contents of the first element in the set of matched
// elements. It includes text and comment nodes.
func (s *Selection) Html() (ret string, e error) {
// Since there is no .innerHtml, the HTML content must be re-created from
// the nodes using html.Render.
var buf bytes.Buffer
if len(s.Nodes) > 0 {
for c := s.Nodes[0].FirstChild; c != nil; c = c.NextSibling {
e = html.Render(&buf, c)
if e != nil {
return
}
}
ret = buf.String()
}
return
}
// AddClass adds the given class(es) to each element in the set of matched elements.
// Multiple class names can be specified, separated by a space or via multiple arguments.
func (s *Selection) AddClass(class ...string) *Selection {
classStr := strings.TrimSpace(strings.Join(class, " "))
if classStr == "" {
return s
}
tcls := getClassesSlice(classStr)
for _, n := range s.Nodes {
curClasses, attr := getClassesAndAttr(n, true)
for _, newClass := range tcls {
if !strings.Contains(curClasses, " "+newClass+" ") {
curClasses += newClass + " "
}
}
setClasses(n, attr, curClasses)
}
return s
}
// HasClass determines whether any of the matched elements are assigned the
// given class.
func (s *Selection) HasClass(class string) bool {
class = " " + class + " "
for _, n := range s.Nodes {
classes, _ := getClassesAndAttr(n, false)
if strings.Contains(classes, class) {
return true
}
}
return false
}
// RemoveClass removes the given class(es) from each element in the set of matched elements.
// Multiple class names can be specified, separated by a space or via multiple arguments.
// If no class name is provided, all classes are removed.
func (s *Selection) RemoveClass(class ...string) *Selection {
var rclasses []string
classStr := strings.TrimSpace(strings.Join(class, " "))
remove := classStr == ""
if !remove {
rclasses = getClassesSlice(classStr)
}
for _, n := range s.Nodes {
if remove {
removeAttr(n, "class")
} else {
classes, attr := getClassesAndAttr(n, true)
for _, rcl := range rclasses {
classes = strings.Replace(classes, " "+rcl+" ", " ", -1)
}
setClasses(n, attr, classes)
}
}
return s
}
// ToggleClass adds or removes the given class(es) for each element in the set of matched elements.
// Multiple class names can be specified, separated by a space or via multiple arguments.
func (s *Selection) ToggleClass(class ...string) *Selection {
classStr := strings.TrimSpace(strings.Join(class, " "))
if classStr == "" {
return s
}
tcls := getClassesSlice(classStr)
for _, n := range s.Nodes {
classes, attr := getClassesAndAttr(n, true)
for _, tcl := range tcls {
if strings.Contains(classes, " "+tcl+" ") {
classes = strings.Replace(classes, " "+tcl+" ", " ", -1)
} else {
classes += tcl + " "
}
}
setClasses(n, attr, classes)
}
return s
}
// Get the specified node's text content.
func getNodeText(node *html.Node) string {
if node.Type == html.TextNode {
// Keep newlines and spaces, like jQuery
return node.Data
} else if node.FirstChild != nil {
var buf bytes.Buffer
for c := node.FirstChild; c != nil; c = c.NextSibling {
buf.WriteString(getNodeText(c))
}
return buf.String()
}
return ""
}
func getAttributePtr(attrName string, n *html.Node) *html.Attribute {
if n == nil {
return nil
}
for i, a := range n.Attr {
if a.Key == attrName {
return &n.Attr[i]
}
}
return nil
}
// Private function to get the specified attribute's value from a node.
func getAttributeValue(attrName string, n *html.Node) (val string, exists bool) {
if a := getAttributePtr(attrName, n); a != nil {
val = a.Val
exists = true
}
return
}
// Get and normalize the "class" attribute from the node.
func getClassesAndAttr(n *html.Node, create bool) (classes string, attr *html.Attribute) {
// Applies only to element nodes
if n.Type == html.ElementNode {
attr = getAttributePtr("class", n)
if attr == nil && create {
n.Attr = append(n.Attr, html.Attribute{
Key: "class",
Val: "",
})
attr = &n.Attr[len(n.Attr)-1]
}
}
if attr == nil {
classes = " "
} else {
classes = rxClassTrim.ReplaceAllString(" "+attr.Val+" ", " ")
}
return
}
func getClassesSlice(classes string) []string {
return strings.Split(rxClassTrim.ReplaceAllString(" "+classes+" ", " "), " ")
}
func removeAttr(n *html.Node, attrName string) {
for i, a := range n.Attr {
if a.Key == attrName {
n.Attr[i], n.Attr[len(n.Attr)-1], n.Attr =
n.Attr[len(n.Attr)-1], html.Attribute{}, n.Attr[:len(n.Attr)-1]
return
}
}
}
func setClasses(n *html.Node, attr *html.Attribute, classes string) {
classes = strings.TrimSpace(classes)
if classes == "" {
removeAttr(n, "class")
return
}
attr.Val = classes
}

252
vendor/src/github.com/PuerkitoBio/goquery/property_test.go

@ -1,252 +0,0 @@
package goquery
import (
"regexp"
"strings"
"testing"
)
func TestAttrExists(t *testing.T) {
if val, ok := Doc().Find("a").Attr("href"); !ok {
t.Error("Expected a value for the href attribute.")
} else {
t.Logf("Href of first anchor: %v.", val)
}
}
func TestAttrOr(t *testing.T) {
if val := Doc().Find("a").AttrOr("fake-attribute", "alternative"); val != "alternative" {
t.Error("Expected an alternative value for 'fake-attribute' attribute.")
} else {
t.Logf("Value returned for not existing attribute: %v.", val)
}
if val := Doc().Find("zz").AttrOr("fake-attribute", "alternative"); val != "alternative" {
t.Error("Expected an alternative value for 'fake-attribute' on an empty selection.")
} else {
t.Logf("Value returned for empty selection: %v.", val)
}
}
func TestAttrNotExist(t *testing.T) {
if val, ok := Doc().Find("div.row-fluid").Attr("href"); ok {
t.Errorf("Expected no value for the href attribute, got %v.", val)
}
}
func TestRemoveAttr(t *testing.T) {
sel := Doc2Clone().Find("div")
sel.RemoveAttr("id")
_, ok := sel.Attr("id")
if ok {
t.Error("Expected there to be no id attributes set")
}
}
func TestSetAttr(t *testing.T) {
sel := Doc2Clone().Find("#main")
sel.SetAttr("id", "not-main")
val, ok := sel.Attr("id")
if !ok {
t.Error("Expected an id attribute on main")
}
if val != "not-main" {
t.Errorf("Expected an attribute id to be not-main, got %s", val)
}
}
func TestSetAttr2(t *testing.T) {
sel := Doc2Clone().Find("#main")
sel.SetAttr("foo", "bar")
val, ok := sel.Attr("foo")
if !ok {
t.Error("Expected an 'foo' attribute on main")
}
if val != "bar" {
t.Errorf("Expected an attribute 'foo' to be 'bar', got '%s'", val)
}
}
func TestText(t *testing.T) {
txt := Doc().Find("h1").Text()
if strings.Trim(txt, " \n\r\t") != "Provok.in" {
t.Errorf("Expected text to be Provok.in, found %s.", txt)
}
}
func TestText2(t *testing.T) {
txt := Doc().Find(".hero-unit .container-fluid .row-fluid:nth-child(1)").Text()
if ok, e := regexp.MatchString(`^\s+Provok\.in\s+Prove your point.\s+$`, txt); !ok || e != nil {
t.Errorf("Expected text to be Provok.in Prove your point., found %s.", txt)
if e != nil {
t.Logf("Error: %s.", e.Error())
}
}
}
func TestText3(t *testing.T) {
txt := Doc().Find(".pvk-gutter").First().Text()
// There's an &nbsp; character in there...
if ok, e := regexp.MatchString(`^[\s\x{00A0}]+$`, txt); !ok || e != nil {
t.Errorf("Expected spaces, found <%v>.", txt)
if e != nil {
t.Logf("Error: %s.", e.Error())
}
}
}
func TestHtml(t *testing.T) {
txt, e := Doc().Find("h1").Html()
if e != nil {
t.Errorf("Error: %s.", e)
}
if ok, e := regexp.MatchString(`^\s*<a href="/">Provok<span class="green">\.</span><span class="red">i</span>n</a>\s*$`, txt); !ok || e != nil {
t.Errorf("Unexpected HTML content, found %s.", txt)
if e != nil {
t.Logf("Error: %s.", e.Error())
}
}
}
func TestNbsp(t *testing.T) {
src := `<p>Some&nbsp;text</p>`
d, err := NewDocumentFromReader(strings.NewReader(src))
if err != nil {
t.Fatal(err)
}
txt := d.Find("p").Text()
ix := strings.Index(txt, "\u00a0")
if ix != 4 {
t.Errorf("Text: expected a non-breaking space at index 4, got %d", ix)
}
h, err := d.Find("p").Html()
if err != nil {
t.Fatal(err)
}
ix = strings.Index(h, "\u00a0")
if ix != 4 {
t.Errorf("Html: expected a non-breaking space at index 4, got %d", ix)
}
}
func TestAddClass(t *testing.T) {
sel := Doc2Clone().Find("#main")
sel.AddClass("main main main")
// Make sure that class was only added once
if a, ok := sel.Attr("class"); !ok || a != "main" {
t.Error("Expected #main to have class main")
}
}
func TestAddClassSimilar(t *testing.T) {
sel := Doc2Clone().Find("#nf5")
sel.AddClass("odd")
assertClass(t, sel, "odd")
assertClass(t, sel, "odder")
printSel(t, sel.Parent())
}
func TestAddEmptyClass(t *testing.T) {
sel := Doc2Clone().Find("#main")
sel.AddClass("")
// Make sure that class was only added once
if a, ok := sel.Attr("class"); ok {
t.Errorf("Expected #main to not to have a class, have: %s", a)
}
}
func TestAddClasses(t *testing.T) {
sel := Doc2Clone().Find("#main")
sel.AddClass("a b")
// Make sure that class was only added once
if !sel.HasClass("a") || !sel.HasClass("b") {
t.Errorf("#main does not have classes")
}
}
func TestHasClass(t *testing.T) {
sel := Doc().Find("div")
if !sel.HasClass("span12") {
t.Error("Expected at least one div to have class span12.")
}
}
func TestHasClassNone(t *testing.T) {
sel := Doc().Find("h2")
if sel.HasClass("toto") {
t.Error("Expected h1 to have no class.")
}
}
func TestHasClassNotFirst(t *testing.T) {
sel := Doc().Find(".alert")
if !sel.HasClass("alert-error") {
t.Error("Expected .alert to also have class .alert-error.")
}
}
func TestRemoveClass(t *testing.T) {
sel := Doc2Clone().Find("#nf1")
sel.RemoveClass("one row")
if !sel.HasClass("even") || sel.HasClass("one") || sel.HasClass("row") {
classes, _ := sel.Attr("class")
t.Error("Expected #nf1 to have class even, has ", classes)
}
}
func TestRemoveClassSimilar(t *testing.T) {
sel := Doc2Clone().Find("#nf5, #nf6")
assertLength(t, sel.Nodes, 2)
sel.RemoveClass("odd")
assertClass(t, sel.Eq(0), "odder")
printSel(t, sel)
}
func TestRemoveAllClasses(t *testing.T) {
sel := Doc2Clone().Find("#nf1")
sel.RemoveClass()
if a, ok := sel.Attr("class"); ok {
t.Error("All classes were not removed, has ", a)
}
sel = Doc2Clone().Find("#main")
sel.RemoveClass()
if a, ok := sel.Attr("class"); ok {
t.Error("All classes were not removed, has ", a)
}
}
func TestToggleClass(t *testing.T) {
sel := Doc2Clone().Find("#nf1")
sel.ToggleClass("one")
if sel.HasClass("one") {
t.Error("Expected #nf1 to not have class one")
}
sel.ToggleClass("one")
if !sel.HasClass("one") {
t.Error("Expected #nf1 to have class one")
}
sel.ToggleClass("one even row")
if a, ok := sel.Attr("class"); ok {
t.Errorf("Expected #nf1 to have no classes, have %q", a)
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save