Merge pull request #386 from var23rav/master

Replaced hardcoded arg('GET') with http.MethodGet constant
This commit is contained in:
Björn Rabenstein 2018-02-23 15:47:18 +01:00 committed by GitHub
commit c3324c1198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ func (h *httpAPI) Query(ctx context.Context, query string, ts time.Time) (model.
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}
@ -179,7 +179,7 @@ func (h *httpAPI) QueryRange(ctx context.Context, query string, r Range) (model.
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}
@ -223,7 +223,7 @@ func (h *httpAPI) Series(ctx context.Context, matches []string, startTime time.T
u.RawQuery = q.Encode()
req, err := http.NewRequest("GET", u.String(), nil)
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, err
}