Skip to content

Commit 5b781fa

Browse files
authored
Merge pull request #154 from SparkPost/issue-153
use `go mod` for dependency management
2 parents 7dc7394 + 114b25a commit 5b781fa

File tree

6 files changed

+56
-6
lines changed

6 files changed

+56
-6
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22
.vscode
33

44
**/*.test
5+
6+
cmd/fblgen/fblgen
7+
cmd/mimedump/mimedump
8+
cmd/oobgen/oobgen
9+
cmd/qp/qp
10+
cmd/send-a-gopher/send-a-gopher
11+
cmd/sparks/sparks

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22
sudo: false
33
go:
4-
- "1.10"
4+
- "1.14"
55
before_install:
66
go get github.com/mattn/goveralls
77
script:

go.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/SparkPost/gosparkpost
2+
3+
go 1.14
4+
5+
require (
6+
github.com/buger/jsonparser v1.0.0
7+
github.com/jhillyerd/enmime v0.8.0
8+
github.com/kylelemons/godebug v1.1.0
9+
github.com/pkg/errors v0.9.1
10+
)

go.sum

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
github.com/buger/jsonparser v1.0.0 h1:etJTGF5ESxjI0Ic2UaLQs2LQQpa8G9ykQScukbh4L8A=
2+
github.com/buger/jsonparser v1.0.0/go.mod h1:tgcrVJ81GPSF0mz+0nu1Xaz0fazGPrmmJfJtxjbHhUQ=
3+
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a h1:MISbI8sU/PSK/ztvmWKFcI7UGb5/HQT7B+i3a2myKgI=
4+
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a/go.mod h1:2GxOXOlEPAMFPfp014mK1SWq8G8BN8o7/dfYqJrVGn8=
5+
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
6+
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
7+
github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561 h1:aBzukfDxQlCTVS0NBUjI5YA3iVeaZ9Tb5PxNrrIP1xs=
8+
github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
9+
github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43 h1:jTkyeF7NZ5oIr0ESmcrpiDgAfoidCBF4F5kJhjtaRwE=
10+
github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
11+
github.com/jhillyerd/enmime v0.8.0 h1:PHc/2LXtnDmCDm0V4+5NlBx+MoubmufhuNXwpKSV2o8=
12+
github.com/jhillyerd/enmime v0.8.0/go.mod h1:MBHs3ugk03NGjMM6PuRynlKf+HA5eSillZ+TRCm73AE=
13+
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
14+
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
15+
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
16+
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
17+
github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88=
18+
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
19+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
20+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
21+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
22+
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca h1:NugYot0LIVPxTvN8n+Kvkn6TrbMyxQiuvKdEwFdR9vI=
23+
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU=
24+
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo=
25+
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=
26+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
27+
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk=
28+
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
29+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
30+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
31+
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
32+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
33+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

message_events_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestMessageEventsSearch(t *testing.T) {
6565
// Trigger url parse failure
6666
if idx == 0 {
6767
testClient.Config.BaseUrl += "/%xx"
68-
test.err = errors.Errorf("parsing url: parse %s: %s",
68+
test.err = errors.Errorf("parsing url: parse %q: %s",
6969
testClient.Config.BaseUrl+
7070
fmt.Sprintf(sp.MessageEventsPathFormat, testClient.Config.ApiVersion),
7171
`invalid URL escape "%xx"`)
@@ -122,7 +122,7 @@ func TestEventSamples(t *testing.T) {
122122

123123
if idx == 0 {
124124
testClient.Config.BaseUrl += "/%xx"
125-
test.err = errors.Errorf("parsing url: parse %s: %s",
125+
test.err = errors.Errorf("parsing url: parse %q: %s",
126126
testClient.Config.BaseUrl+
127127
fmt.Sprintf(sp.MessageEventsSamplesPathFormat, testClient.Config.ApiVersion),
128128
`invalid URL escape "%xx"`)

webhooks_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ func TestWebhookBadHost(t *testing.T) {
1515
testClient.Config.BaseUrl = "%zz"
1616

1717
_, err := testClient.Webhooks(&sp.WebhookListWrapper{})
18-
if err == nil || err.Error() != `building request: parse %zz/api/v1/webhooks: invalid URL escape "%zz"` {
18+
if err == nil || err.Error() != `building request: parse "%zz/api/v1/webhooks": invalid URL escape "%zz"` {
1919
t.Errorf("error: %#v", err)
2020
}
2121

2222
_, err = testClient.WebhookStatus(&sp.WebhookStatusWrapper{ID: "id"})
23-
if err == nil || err.Error() != `building request: parse %zz/api/v1/webhooks/id/batch-status: invalid URL escape "%zz"` {
23+
if err == nil || err.Error() != `building request: parse "%zz/api/v1/webhooks/id/batch-status": invalid URL escape "%zz"` {
2424
t.Errorf("error: %#v", err)
2525
}
2626

2727
_, err = testClient.WebhookDetail(&sp.WebhookDetailWrapper{ID: "id"})
28-
if err == nil || err.Error() != `building request: parse %zz/api/v1/webhooks/id: invalid URL escape "%zz"` {
28+
if err == nil || err.Error() != `building request: parse "%zz/api/v1/webhooks/id": invalid URL escape "%zz"` {
2929
t.Errorf("error: %#v", err)
3030
}
3131

0 commit comments

Comments
 (0)