Skip to content

Commit

Permalink
Using http.NoBody instead of nil in http.NewRequest calls. (#188)
Browse files Browse the repository at this point in the history
# Describe Request

Using http.NoBody instead of nil in http.NewRequest calls.

Fixed #183 

# Change Type

Code improvement.
  • Loading branch information
cinar authored Jul 20, 2024
1 parent 94f3a2d commit 53ae058
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asset/tiingo_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (r *TiingoRepository) GetSince(name string, date time.Time) (<-chan *Snapsh
date.Format("2006-01-02"),
r.apiKey)

req, err := http.NewRequest(http.MethodGet, url, nil)
req, err := http.NewRequest(http.MethodGet, url, http.NoBody)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -196,7 +196,7 @@ func (r *TiingoRepository) LastDate(name string) (time.Time, error) {

url := fmt.Sprintf("%s/tiingo/daily/%s?token=%s", r.BaseURL, name, r.apiKey)

req, err := http.NewRequest(http.MethodGet, url, nil)
req, err := http.NewRequest(http.MethodGet, url, http.NoBody)
if err != nil {
return lastDate, err
}
Expand Down

0 comments on commit 53ae058

Please sign in to comment.