From 7eb0e42ba4999874b9176ebf360f0f8eff79b6ee Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Sat, 20 Jul 2024 12:37:19 -0700 Subject: [PATCH] Using http.NoBody instead of nil in http.NewRequest calls. --- asset/tiingo_repository.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/tiingo_repository.go b/asset/tiingo_repository.go index e90256f..fb73b80 100644 --- a/asset/tiingo_repository.go +++ b/asset/tiingo_repository.go @@ -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 } @@ -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 }