diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/README.md b/README.md index 77a4bc72..9f00f354 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![BuildStatus](https://travis-ci.org/sendgrid/sendgrid-go.svg?branch=main)](https://travis-ci.org/sendgrid/sendgrid-go) [![Email Notifications Badge](https://dx.sendgrid.com/badge/go)](https://dx.sendgrid.com/newsletter/go) -[![GoDoc](https://godoc.org/github.com/sendgrid/sendgrid-go?status.svg)](https://godoc.org/github.com/sendgrid/sendgrid-go) +[![GoDoc](https://godoc.org/github.com/sendgrid/sendgrid-go?status.svg)](https://pkg.go.dev/github.com/sendgrid/sendgrid-go/v3) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid) [![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-go.svg)](https://github.com/sendgrid/sendgrid-go/graphs/contributors) @@ -24,23 +24,24 @@ We appreciate your continued support, thank you! # Table of Contents -* [Installation](#installation) -* [Quick Start](#quick-start) -* [Processing Inbound Email](#inbound) -* [Usage](#usage) -* [Use Cases](#use-cases) -* [Announcements](#announcements) -* [How to Contribute](#contribute) -* [Troubleshooting](#troubleshooting) -* [About](#about) -* [License](#license) +- [Installation](#installation) +- [Quick Start](#quick-start) +- [Processing Inbound Email](#inbound) +- [Usage](#usage) +- [Use Cases](#use-cases) +- [Announcements](#announcements) +- [How to Contribute](#contribute) +- [Troubleshooting](#troubleshooting) +- [About](#about) +- [License](#license) + # Installation ## Prerequisites -- Go version 1.7 +- Go version 1.12 - The Twilio SendGrid service, starting at the [free level](https://sendgrid.com/free?source=sendgrid-go), to send up to 40,000 emails for the first 30 days, then send 100 emails/day free forever or check out [our pricing](https://sendgrid.com/pricing?source=sendgrid-go). ## Setup Environment Variables @@ -55,7 +56,7 @@ source ./sendgrid.env ## Install Package -`go get github.com/sendgrid/sendgrid-go` +`go get github.com/sendgrid/sendgrid-go/v3` ## Dependencies @@ -80,6 +81,7 @@ source ./sendgrid.env ``` + # Quick Start ## Hello Email @@ -96,8 +98,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() { @@ -130,7 +132,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) @@ -177,7 +179,7 @@ package main import ( "fmt" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" "log" "os" ) @@ -197,13 +199,14 @@ func main() { } ``` - + # Processing Inbound Email Please see [our helper](helpers/inbound) for utilizing our Inbound Parse webhook. + # Usage - [Twilio SendGrid Docs](https://sendgrid.com/docs/API_Reference/index.html) @@ -213,11 +216,13 @@ Please see [our helper](helpers/inbound) for utilizing our Inbound Parse webhook - [v3 Web API Mail Send Helper](helpers/mail/README.md) + # Use Cases [Examples of common API use cases](use-cases/README.md), such as how to send an email with a transactional template. + # Announcements Please see our announcement regarding [breaking changes](https://github.com/sendgrid/sendgrid-go/issues/81). Your support is appreciated! @@ -225,6 +230,7 @@ Please see our announcement regarding [breaking changes](https://github.com/send All updates to this library are documented in our [CHANGELOG](CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-go/releases). You may also subscribe to email [release notifications](https://dx.sendgrid.com/newsletter/go) for releases and breaking changes. + # How to Contribute We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](CONTRIBUTING.md) guide for details. @@ -237,11 +243,13 @@ Quick links: - [Review Pull Requests](CONTRIBUTING.md#code-reviews) + # Troubleshooting Please see our [troubleshooting guide](TROUBLESHOOTING.md) for common library issues. + # About sendgrid-go is maintained and funded by Twilio SendGrid, Inc. The names and logos for sendgrid-go are trademarks of Twilio SendGrid, Inc. @@ -251,4 +259,5 @@ If you need help installing or using the library, please check the [Twilio SendG If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo! # License + [The MIT License (MIT)](LICENSE) diff --git a/USAGE.md b/USAGE.md index 915378dc..5cfe7582 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 01f4c22e..69adc110 100644 --- a/base_interface.go +++ b/base_interface.go @@ -7,7 +7,7 @@ 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/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..3fff267c 100644 --- a/examples/eventwebhook/eventwebhook.go +++ b/examples/eventwebhook/eventwebhook.go @@ -6,8 +6,8 @@ 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 9fdff6a1..c1386156 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 136f3144..757f073c 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/senderauthentication/senderauthentication.go b/examples/senderauthentication/senderauthentication.go index f6d05e21..ca5ae698 100644 --- a/examples/senderauthentication/senderauthentication.go +++ b/examples/senderauthentication/senderauthentication.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/sendgrid/sendgrid-go" + "github.com/sendgrid/sendgrid-go/v3" ) // Createadomainauthentication : Create a domain authentication. 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/go.mod b/go.mod new file mode 100644 index 00000000..87364350 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/sendgrid/sendgrid-go/v3 + +go 1.12 + +require ( + github.com/sendgrid/rest v2.6.2+incompatible + github.com/stretchr/testify v1.6.1 +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..3014022c --- /dev/null +++ b/go.sum @@ -0,0 +1,13 @@ +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 v2.6.2+incompatible h1:zGMNhccsPkIc8SvU9x+qdDz2qhFoGUPGGC4mMvTondA= +github.com/sendgrid/rest v2.6.2+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +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 901c216c..0d3d0afb 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 b52e17d7..a21338a4 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 88d0ffeb..5a7931fa 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 311a970c..5ac3c63c 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-from-two-different-from-emails.md b/use-cases/personalization-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.md index b2f1e35e..ffc0cc21 100644 --- a/use-cases/personalization-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.md +++ b/use-cases/personalization-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.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-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-from-two-different-from-emails.md b/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.md index b022775d..1bfb0416 100644 --- a/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.md +++ b/use-cases/personalization-without-helper-sending-two-emails-to-two-groups-recipients-from-two-different-from-emails.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-authentication.md b/use-cases/setup-domain-authentication.md index a7c69683..6eede07c 100644 --- a/use-cases/setup-domain-authentication.md +++ b/use-cases/setup-domain-authentication.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() {