Skip to content

Commit

Permalink
#387 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Sep 7, 2021
1 parent e2a9556 commit 1233677
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions server/drivers/google_ads/google_ads.go
Expand Up @@ -103,7 +103,7 @@ func NewGoogleAds(ctx context.Context, sourceConfig *base.SourceConfig, collecti

granularity := base.ALL
//for binary search we make a sorted copy of fields
sortedFields := make([]string, 0, len(fields))
sortedFields := make([]string, len(fields))
copy(sortedFields, fields)
sort.Strings(sortedFields)
//looking for interval fields from shortest to longest to select appropriate granularity
Expand Down Expand Up @@ -260,7 +260,7 @@ func query(config *GoogleAdsConfig, httpClient *http.Client, query string) ([]ma
return transformedArray, nil
}

req := httputils.Request{Url: urlStr, Method: http.MethodPost,
req := httputils.Request{URL: urlStr, Method: http.MethodPost,
Body: reqBody, Headers: headers,
ParseReader: parseResponse}

Expand Down
6 changes: 3 additions & 3 deletions server/httputils/utils.go
Expand Up @@ -17,8 +17,8 @@ func (e *Error) Error() string {
}

type Request struct {
Url string
Method string
URL string
Method string
Headers map[string]string
Body []byte
ExpectedStatues []int
Expand All @@ -40,7 +40,7 @@ func (r *Request) Do(client *http.Client) (interface{}, error) {
if r.Body != nil {
rqBodyReader = bytes.NewReader(r.Body)
}
req, err := http.NewRequest(r.Method, r.Url, rqBodyReader)
req, err := http.NewRequest(r.Method, r.URL, rqBodyReader)
if err != nil {
return nil, fmt.Errorf("failed to make request: %s", err)
}
Expand Down

0 comments on commit 1233677

Please sign in to comment.