Skip to content

feat: Adding Go Modules and Adding Go 1.19 compatibility #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
go: [ '1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17' ]
go: [ '1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19' ]
steps:
- name: Checkout smtpapi-go
uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
*.out

.DS_Store
.env
.env
.vscode
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All the updates to this library are documented in our [CHANGELOG](CHANGELOG.md).

## Supported Versions

* Go version 1.11-1.17
* Go version 1.11-1.19

## Prerequisites

Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/sendgrid/smtpapi-go

go 1.11
5 changes: 2 additions & 3 deletions smtpapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package smtpapi
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"reflect"
"regexp"
Expand All @@ -12,7 +11,7 @@ import (
)

func exampleJson() map[string]interface{} {
data, _ := ioutil.ReadFile("smtpapi_test_strings.json")
data, _ := os.ReadFile("smtpapi_test_strings.json")
var f interface{}
json.Unmarshal(data, &f)
json := f.(map[string]interface{})
Expand Down Expand Up @@ -384,7 +383,7 @@ func TestRepoFiles(t *testing.T) {

func TestLicenseYear(t *testing.T) {
t.Parallel()
dat, err := ioutil.ReadFile("LICENSE")
dat, err := os.ReadFile("LICENSE")

currentYear := time.Now().Year()
r := fmt.Sprintf("%d", currentYear)
Expand Down