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>
forest-feature-rebase
Nikos Filippakis 2 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")