From 35eaec62022e9cbb51c83ff88b8a2098592141ad Mon Sep 17 00:00:00 2001 From: tfreville Date: Thu, 4 Jun 2020 23:06:25 +0200 Subject: [PATCH] [?]: Use go module --- .gitignore | 3 +++ README.md | 8 +++---- USAGE.md | 2 +- base_interface.go | 3 ++- docker/README.md | 2 +- docker/examples/apikey/apikey.go | 2 +- docker/examples/mail/mail.go | 2 +- docker/examples/stats/stats.go | 2 +- docker/get-version.go | 2 +- examples/accesssettings/accesssettings.go | 2 +- examples/alerts/alerts.go | 2 +- examples/apikeys/apikeys.go | 2 +- examples/asm/asm.go | 2 +- examples/browsers/browsers.go | 2 +- examples/campaigns/campaigns.go | 2 +- examples/categories/categories.go | 2 +- examples/clients/clients.go | 2 +- examples/contactdb/contactdb.go | 2 +- examples/devices/devices.go | 2 +- examples/eventwebhook/eventwebhook.go | 5 ++-- examples/geo/geo.go | 2 +- examples/helpers/mail/example.go | 4 ++-- examples/ips/ips.go | 2 +- examples/mail/mail.go | 2 +- examples/mailboxproviders/mailboxproviders.go | 2 +- examples/mailsettings/mailsettings.go | 2 +- examples/partnersettings/partnersettings.go | 2 +- examples/scopes/scopes.go | 2 +- examples/senders/senders.go | 2 +- examples/stats/stats.go | 2 +- examples/subusers/subusers.go | 2 +- examples/suppression/suppression.go | 2 +- examples/templates/templates.go | 2 +- examples/trackingsettings/trackingsettings.go | 2 +- examples/user/user.go | 2 +- examples/whitelabel/whitelabel.go | 2 +- go.mod | 9 +++++++ go.sum | 16 +++++++++++++ helpers/inbound/README.md | 2 +- proposal/mail-helper-refactor.md | 24 +++++++++---------- proposal/mail-helper-refactor_2.md | 24 +++++++++---------- sendgrid_test.go | 2 +- use-cases/attachments-with-mailer-helper.md | 4 ++-- .../attachments-without-mailer-helper.md | 2 +- use-cases/custom-args-with-mailer-helper.md | 4 ++-- .../custom-args-without-mailer-helper.md | 2 +- .../legacy-templates-with-mailer-helper.md | 4 ++-- .../legacy-templates-without-mailer-helper.md | 2 +- ...ngle-email-single-recipient-with-cc-bcc.md | 4 ++-- ...g-single-email-single-recipient-with-cc.md | 4 ++-- ...n-sending-single-email-single-recipient.md | 4 ++-- ...ing-single-email-to-multiple-recipients.md | 4 ++-- ...-single-recipients-with-multiple-cc-bcc.md | 4 ++-- ...ing-two-emails-to-two-groups-recipients.md | 4 ++-- ...nding-same-email-to-multiple-recipients.md | 2 +- ...ngle-email-single-recipient-with-cc-bcc.md | 2 +- ...g-single-email-single-recipient-with-cc.md | 2 +- ...r-sending-single-email-single-recipient.md | 2 +- ...-single-recipients-with-multiple-cc-bcc.md | 2 +- ...ing-two-emails-to-two-groups-recipients.md | 2 +- use-cases/sections-with-mailer-helper.md | 4 ++-- use-cases/sections-without-mailer-helper.md | 2 +- use-cases/setup-domain-whitelabel.md | 2 +- use-cases/substitutions-with-mailer-helper.md | 4 ++-- .../substitutions-without-mailer-helper.md | 2 +- ...nsactional-templates-with-mailer-helper.md | 4 ++-- ...ctional-templates-without-mailer-helper.md | 4 ++-- use-cases/view-email-stats.md | 2 +- 68 files changed, 135 insertions(+), 105 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitignore b/.gitignore index 05a34cd5..a4372dc4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ coverage.txt sendgrid.env .vscode prism* +.idea +vendor +profile.out \ No newline at end of file diff --git a/README.md b/README.md index eaf1f4e6..e91a3d87 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -129,7 +129,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) @@ -176,7 +176,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) diff --git a/USAGE.md b/USAGE.md index fad42cab..880e13a6 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,7 +7,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) diff --git a/base_interface.go b/base_interface.go index b86f201f..cf4afbfc 100644 --- a/base_interface.go +++ b/base_interface.go @@ -7,7 +7,8 @@ import ( "time" "github.com/sendgrid/rest" - "github.com/sendgrid/sendgrid-go/helpers/mail" + + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) // Version is this client library's current version diff --git a/docker/README.md b/docker/README.md index 0bf817b2..c55dad9f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -19,7 +19,7 @@ package main import ( "os" "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" ) diff --git a/docker/examples/apikey/apikey.go b/docker/examples/apikey/apikey.go index b2e56012..f9cd0116 100644 --- a/docker/examples/apikey/apikey.go +++ b/docker/examples/apikey/apikey.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) diff --git a/docker/examples/mail/mail.go b/docker/examples/mail/mail.go index 6e079cb2..9525143d 100644 --- a/docker/examples/mail/mail.go +++ b/docker/examples/mail/mail.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // SendSampleHelloMail demonstrates how to send a sample e-mail with a subject line diff --git a/docker/examples/stats/stats.go b/docker/examples/stats/stats.go index d83c2b21..e658848b 100644 --- a/docker/examples/stats/stats.go +++ b/docker/examples/stats/stats.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) diff --git a/docker/get-version.go b/docker/get-version.go index bef00d93..5dcb5f1b 100644 --- a/docker/get-version.go +++ b/docker/get-version.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/examples/accesssettings/accesssettings.go b/examples/accesssettings/accesssettings.go index 0f33cd48..4700d3b8 100644 --- a/examples/accesssettings/accesssettings.go +++ b/examples/accesssettings/accesssettings.go @@ -5,7 +5,7 @@ import ( "log" "os" - sendgrid "github.com/sendgrid/sendgrid-go" + sendgrid "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveallrecentaccessattempts : Retrieve all recent access attempts diff --git a/examples/alerts/alerts.go b/examples/alerts/alerts.go index 8d288667..ca2acac4 100644 --- a/examples/alerts/alerts.go +++ b/examples/alerts/alerts.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // CreateanewAlert : Create a new Alert diff --git a/examples/apikeys/apikeys.go b/examples/apikeys/apikeys.go index 4135354e..d40d341c 100644 --- a/examples/apikeys/apikeys.go +++ b/examples/apikeys/apikeys.go @@ -5,7 +5,7 @@ import ( "log" "os" - sendgrid "github.com/sendgrid/sendgrid-go" + sendgrid "github.com/sendgrid/sendgrid-go/v3" ) // CreateAPIkeys : Create API keys diff --git a/examples/asm/asm.go b/examples/asm/asm.go index 528c7583..beca8bf3 100644 --- a/examples/asm/asm.go +++ b/examples/asm/asm.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Createanewsuppressiongroup : Create a new suppression group diff --git a/examples/browsers/browsers.go b/examples/browsers/browsers.go index e646045d..f87d2c81 100644 --- a/examples/browsers/browsers.go +++ b/examples/browsers/browsers.go @@ -5,7 +5,7 @@ import ( "log" "os" - sendgrid "github.com/sendgrid/sendgrid-go" + sendgrid "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveemailstatisticsbybrowser : Retrieve email statistics by browser. diff --git a/examples/campaigns/campaigns.go b/examples/campaigns/campaigns.go index 86b2a55f..aa8e6329 100644 --- a/examples/campaigns/campaigns.go +++ b/examples/campaigns/campaigns.go @@ -5,7 +5,7 @@ import ( "log" "os" - sendgrid "github.com/sendgrid/sendgrid-go" + sendgrid "github.com/sendgrid/sendgrid-go/v3" ) // CreateaCampaign : Create a Campaign diff --git a/examples/categories/categories.go b/examples/categories/categories.go index 397ca975..a05d044e 100644 --- a/examples/categories/categories.go +++ b/examples/categories/categories.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveallcategories : Retrieve all categories diff --git a/examples/clients/clients.go b/examples/clients/clients.go index 27a45542..29b7faaa 100644 --- a/examples/clients/clients.go +++ b/examples/clients/clients.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveemailstatisticsbyclienttype : Retrieve email statistics by client type. diff --git a/examples/contactdb/contactdb.go b/examples/contactdb/contactdb.go index 0cf50ca4..3f219a8a 100644 --- a/examples/contactdb/contactdb.go +++ b/examples/contactdb/contactdb.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // CreateaCustomField : Create a Custom Field diff --git a/examples/devices/devices.go b/examples/devices/devices.go index 76b481a6..fd179e3a 100644 --- a/examples/devices/devices.go +++ b/examples/devices/devices.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveemailstatisticsbydevicetype : Retrieve email statistics by device type. diff --git a/examples/eventwebhook/eventwebhook.go b/examples/eventwebhook/eventwebhook.go index 3a9a0d70..2a95a281 100644 --- a/examples/eventwebhook/eventwebhook.go +++ b/examples/eventwebhook/eventwebhook.go @@ -6,8 +6,9 @@ import ( "os" "github.com/sendgrid/rest" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/eventwebhook" + + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/eventwebhook" ) // EnableSignedWebhook : Enables Signed Event Webhook. diff --git a/examples/geo/geo.go b/examples/geo/geo.go index ca6a0b75..406bdc7f 100644 --- a/examples/geo/geo.go +++ b/examples/geo/geo.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveemailstatisticsbycountryandstateprovince : Retrieve email statistics by country and state/province. diff --git a/examples/helpers/mail/example.go b/examples/helpers/mail/example.go index a66e60f7..b973440c 100644 --- a/examples/helpers/mail/example.go +++ b/examples/helpers/mail/example.go @@ -6,8 +6,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) // Minimum required to send an email diff --git a/examples/ips/ips.go b/examples/ips/ips.go index eb1e2ae3..b582f39b 100644 --- a/examples/ips/ips.go +++ b/examples/ips/ips.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // RetrieveallIPaddresses : Retrieve all IP addresses diff --git a/examples/mail/mail.go b/examples/mail/mail.go index e9630f5c..571d8a46 100644 --- a/examples/mail/mail.go +++ b/examples/mail/mail.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // CreateabatchID : Create a batch ID diff --git a/examples/mailboxproviders/mailboxproviders.go b/examples/mailboxproviders/mailboxproviders.go index dfb8ee5d..f4524db5 100644 --- a/examples/mailboxproviders/mailboxproviders.go +++ b/examples/mailboxproviders/mailboxproviders.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveemailstatisticsbymailboxprovider : Retrieve email statistics by mailbox provider. diff --git a/examples/mailsettings/mailsettings.go b/examples/mailsettings/mailsettings.go index 4a5ee632..b9111208 100644 --- a/examples/mailsettings/mailsettings.go +++ b/examples/mailsettings/mailsettings.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveallmailsettings : Retrieve all mail settings diff --git a/examples/partnersettings/partnersettings.go b/examples/partnersettings/partnersettings.go index 08adf759..21146074 100644 --- a/examples/partnersettings/partnersettings.go +++ b/examples/partnersettings/partnersettings.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Returnsalistofallpartnersettings : Returns a list of all partner settings. diff --git a/examples/scopes/scopes.go b/examples/scopes/scopes.go index bd698ba5..746e5d5f 100644 --- a/examples/scopes/scopes.go +++ b/examples/scopes/scopes.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrievealistofscopesforwhichthisuserhasaccess : Retrieve a list of scopes for which this user has access. diff --git a/examples/senders/senders.go b/examples/senders/senders.go index cba192e6..63116ac1 100644 --- a/examples/senders/senders.go +++ b/examples/senders/senders.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // CreateaSenderIdentity : Create a Sender Identity diff --git a/examples/stats/stats.go b/examples/stats/stats.go index 2fa286f2..0ade96e1 100644 --- a/examples/stats/stats.go +++ b/examples/stats/stats.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveglobalemailstatistics : Retrieve global email statistics diff --git a/examples/subusers/subusers.go b/examples/subusers/subusers.go index 954de9ac..ab90a544 100644 --- a/examples/subusers/subusers.go +++ b/examples/subusers/subusers.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // CreateSubuser : Creates a Subuser diff --git a/examples/suppression/suppression.go b/examples/suppression/suppression.go index 421c001f..4b7eab74 100644 --- a/examples/suppression/suppression.go +++ b/examples/suppression/suppression.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Retrieveallblocks : Retrieve all blocks diff --git a/examples/templates/templates.go b/examples/templates/templates.go index 05d7b5c0..fa23aa41 100644 --- a/examples/templates/templates.go +++ b/examples/templates/templates.go @@ -5,7 +5,7 @@ import ( "log" "os" - sendgrid "github.com/sendgrid/sendgrid-go" + sendgrid "github.com/sendgrid/sendgrid-go/v3" ) // Createatransactionaltemplate : Create a transactional template. diff --git a/examples/trackingsettings/trackingsettings.go b/examples/trackingsettings/trackingsettings.go index 055fd41a..c069ef5a 100644 --- a/examples/trackingsettings/trackingsettings.go +++ b/examples/trackingsettings/trackingsettings.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // RetrieveTrackingSettings : Retrieve Tracking Settings diff --git a/examples/user/user.go b/examples/user/user.go index 92c867ce..f0ba39f4 100644 --- a/examples/user/user.go +++ b/examples/user/user.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Getausersaccountinformation : Get a user's account information. diff --git a/examples/whitelabel/whitelabel.go b/examples/whitelabel/whitelabel.go index 5a75b1e1..79e07ebe 100644 --- a/examples/whitelabel/whitelabel.go +++ b/examples/whitelabel/whitelabel.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Createadomainwhitelabel : Create a domain whitelabel. diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..7060cc44 --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module github.com/sendgrid/sendgrid-go/v3 + +go 1.13 + +require ( + github.com/sendgrid/rest v2.4.1+incompatible + github.com/sendgrid/sendgrid-go v3.5.0+incompatible // indirect + github.com/stretchr/testify v1.6.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..669d208e --- /dev/null +++ b/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sendgrid/rest v1.0.2 h1:xdfALkR1m9eqf41/zEnUmV0fw4b31ZzGZ4Dj5f2/w04= +github.com/sendgrid/rest v2.4.1+incompatible h1:HDib/5xzQREPq34lN3YMhQtMkdXxS/qLp5G3k9a5++4= +github.com/sendgrid/rest v2.4.1+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= +github.com/sendgrid/sendgrid-go v1.2.0 h1:2K3teZdhaPe12ftFyFL4AWDH4QmNPc+sCi6mWFx5+oo= +github.com/sendgrid/sendgrid-go v3.5.0+incompatible h1:kosbgHyNVYVaqECDYvFVLVD9nvThweBd6xp7vaCT3GI= +github.com/sendgrid/sendgrid-go v3.5.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= +github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/helpers/inbound/README.md b/helpers/inbound/README.md index a09a2701..deb72b94 100644 --- a/helpers/inbound/README.md +++ b/helpers/inbound/README.md @@ -16,7 +16,7 @@ import ( "log" "net/http" - "github.com/sendgrid/sendgrid-go/helpers/inbound" + "github.com/sendgrid/sendgrid-go/v3/helpers/inbound" ) func inboundHandler(response http.ResponseWriter, request *http.Request) { diff --git a/proposal/mail-helper-refactor.md b/proposal/mail-helper-refactor.md index a2429ec5..7aff3c9e 100644 --- a/proposal/mail-helper-refactor.md +++ b/proposal/mail-helper-refactor.md @@ -11,8 +11,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -50,8 +50,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -90,8 +90,8 @@ import ( "os" "time" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -164,8 +164,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -311,8 +311,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -410,8 +410,8 @@ import ( "fmt" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/proposal/mail-helper-refactor_2.md b/proposal/mail-helper-refactor_2.md index 10002972..77118a70 100644 --- a/proposal/mail-helper-refactor_2.md +++ b/proposal/mail-helper-refactor_2.md @@ -12,8 +12,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -51,8 +51,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -94,8 +94,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -150,8 +150,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -394,8 +394,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { @@ -474,8 +474,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/sendgrid_test.go b/sendgrid_test.go index 4e61d642..98bf0d1e 100644 --- a/sendgrid_test.go +++ b/sendgrid_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/sendgrid/rest" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" "github.com/stretchr/testify/assert" ) diff --git a/use-cases/attachments-with-mailer-helper.md b/use-cases/attachments-with-mailer-helper.md index 551847c9..4a4532a6 100644 --- a/use-cases/attachments-with-mailer-helper.md +++ b/use-cases/attachments-with-mailer-helper.md @@ -9,8 +9,8 @@ import ( "os" "encoding/base64" "io/ioutil" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/attachments-without-mailer-helper.md b/use-cases/attachments-without-mailer-helper.md index ea97e556..9d6ace3d 100644 --- a/use-cases/attachments-without-mailer-helper.md +++ b/use-cases/attachments-without-mailer-helper.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/custom-args-with-mailer-helper.md b/use-cases/custom-args-with-mailer-helper.md index e3b80ee3..01bd0f68 100644 --- a/use-cases/custom-args-with-mailer-helper.md +++ b/use-cases/custom-args-with-mailer-helper.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/custom-args-without-mailer-helper.md b/use-cases/custom-args-without-mailer-helper.md index fd3eaa49..e5076039 100644 --- a/use-cases/custom-args-without-mailer-helper.md +++ b/use-cases/custom-args-without-mailer-helper.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/legacy-templates-with-mailer-helper.md b/use-cases/legacy-templates-with-mailer-helper.md index 63486910..0f3f1783 100644 --- a/use-cases/legacy-templates-with-mailer-helper.md +++ b/use-cases/legacy-templates-with-mailer-helper.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/legacy-templates-without-mailer-helper.md b/use-cases/legacy-templates-without-mailer-helper.md index c3578ac7..26c34b72 100644 --- a/use-cases/legacy-templates-without-mailer-helper.md +++ b/use-cases/legacy-templates-without-mailer-helper.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-sending-single-email-single-recipient-with-cc-bcc.md b/use-cases/personalization-sending-single-email-single-recipient-with-cc-bcc.md index 670653dd..db273d2b 100644 --- a/use-cases/personalization-sending-single-email-single-recipient-with-cc-bcc.md +++ b/use-cases/personalization-sending-single-email-single-recipient-with-cc-bcc.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-sending-single-email-single-recipient-with-cc.md b/use-cases/personalization-sending-single-email-single-recipient-with-cc.md index 6d0c6128..61fd2665 100644 --- a/use-cases/personalization-sending-single-email-single-recipient-with-cc.md +++ b/use-cases/personalization-sending-single-email-single-recipient-with-cc.md @@ -9,8 +9,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-sending-single-email-single-recipient.md b/use-cases/personalization-sending-single-email-single-recipient.md index bef06379..921f848d 100644 --- a/use-cases/personalization-sending-single-email-single-recipient.md +++ b/use-cases/personalization-sending-single-email-single-recipient.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-sending-single-email-to-multiple-recipients.md b/use-cases/personalization-sending-single-email-to-multiple-recipients.md index 1224c86c..662dd65b 100644 --- a/use-cases/personalization-sending-single-email-to-multiple-recipients.md +++ b/use-cases/personalization-sending-single-email-to-multiple-recipients.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md b/use-cases/personalization-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md index bbfbaa32..9609d87b 100644 --- a/use-cases/personalization-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md +++ b/use-cases/personalization-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-sending-two-emails-to-two-groups-recipients.md b/use-cases/personalization-sending-two-emails-to-two-groups-recipients.md index e8a3d887..2e96af15 100644 --- a/use-cases/personalization-sending-two-emails-to-two-groups-recipients.md +++ b/use-cases/personalization-sending-two-emails-to-two-groups-recipients.md @@ -9,8 +9,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-same-email-to-multiple-recipients.md b/use-cases/personalization-without-helper-sending-same-email-to-multiple-recipients.md index e815f04f..050462b2 100644 --- a/use-cases/personalization-without-helper-sending-same-email-to-multiple-recipients.md +++ b/use-cases/personalization-without-helper-sending-same-email-to-multiple-recipients.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc-bcc.md b/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc-bcc.md index 7b78ab77..32248330 100644 --- a/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc-bcc.md +++ b/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc-bcc.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc.md b/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc.md index 5f43c209..45f06419 100644 --- a/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc.md +++ b/use-cases/personalization-without-helper-sending-single-email-single-recipient-with-cc.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-single-email-single-recipient.md b/use-cases/personalization-without-helper-sending-single-email-single-recipient.md index 236880d3..b1070a67 100644 --- a/use-cases/personalization-without-helper-sending-single-email-single-recipient.md +++ b/use-cases/personalization-without-helper-sending-single-email-single-recipient.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md b/use-cases/personalization-without-helper-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md index 042a4f3a..7e076f5f 100644 --- a/use-cases/personalization-without-helper-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md +++ b/use-cases/personalization-without-helper-sending-single-email-to-single-recipients-with-multiple-cc-bcc.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients.md b/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients.md index ad86b5d5..4bf7b6fb 100644 --- a/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients.md +++ b/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/sections-with-mailer-helper.md b/use-cases/sections-with-mailer-helper.md index 0d41778f..08cfe41c 100644 --- a/use-cases/sections-with-mailer-helper.md +++ b/use-cases/sections-with-mailer-helper.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/sections-without-mailer-helper.md b/use-cases/sections-without-mailer-helper.md index cb507a66..d3a815b3 100644 --- a/use-cases/sections-without-mailer-helper.md +++ b/use-cases/sections-without-mailer-helper.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/setup-domain-whitelabel.md b/use-cases/setup-domain-whitelabel.md index ede88047..93e6b3e7 100644 --- a/use-cases/setup-domain-whitelabel.md +++ b/use-cases/setup-domain-whitelabel.md @@ -12,7 +12,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/substitutions-with-mailer-helper.md b/use-cases/substitutions-with-mailer-helper.md index aac67a93..7032edb0 100644 --- a/use-cases/substitutions-with-mailer-helper.md +++ b/use-cases/substitutions-with-mailer-helper.md @@ -8,8 +8,8 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" ) func main() { diff --git a/use-cases/substitutions-without-mailer-helper.md b/use-cases/substitutions-without-mailer-helper.md index 14c7ad38..f6c1b5e8 100644 --- a/use-cases/substitutions-without-mailer-helper.md +++ b/use-cases/substitutions-without-mailer-helper.md @@ -8,7 +8,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() { diff --git a/use-cases/transactional-templates-with-mailer-helper.md b/use-cases/transactional-templates-with-mailer-helper.md index 17847832..644cfded 100644 --- a/use-cases/transactional-templates-with-mailer-helper.md +++ b/use-cases/transactional-templates-with-mailer-helper.md @@ -5,8 +5,8 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" "os" ) diff --git a/use-cases/transactional-templates-without-mailer-helper.md b/use-cases/transactional-templates-without-mailer-helper.md index 8a7682d4..97880240 100644 --- a/use-cases/transactional-templates-without-mailer-helper.md +++ b/use-cases/transactional-templates-without-mailer-helper.md @@ -5,8 +5,8 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" - "github.com/sendgrid/sendgrid-go/helpers/mail" + "github.com/sendgrid/sendgrid-go/v3" + "github.com/sendgrid/sendgrid-go/v3/helpers/mail" "os" ) diff --git a/use-cases/view-email-stats.md b/use-cases/view-email-stats.md index c9f13993..4f7d570c 100644 --- a/use-cases/view-email-stats.md +++ b/use-cases/view-email-stats.md @@ -10,7 +10,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) func main() {