Skip to content

Commit

Permalink
Merge pull request #216 from Strum355/patch-1
Browse files Browse the repository at this point in the history
Initialize map on declaration
  • Loading branch information
Matt Bernier committed Oct 28, 2017
2 parents 0143b3e + 6d1a996 commit 0e31003
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sendgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ func GetRequest(key string, endpoint string, host string) rest.Request {
host = "https://api.sendgrid.com"
}
baseURL := host + endpoint
requestHeaders := make(map[string]string)
requestHeaders["Authorization"] = "Bearer " + key
requestHeaders["User-Agent"] = "sendgrid/" + Version + ";go"
requestHeaders["Accept"] = "application/json"
requestHeaders := map[string]string{
"Authorization": "Bearer " + key,
"User-Agent": "sendgrid/" + Version + ";go",
"Accept": "application/json",
}
request := rest.Request{
BaseURL: baseURL,
Headers: requestHeaders,
Expand Down

0 comments on commit 0e31003

Please sign in to comment.