Skip to content

Commit

Permalink
Only copy Transport exported fields (#5844)
Browse files Browse the repository at this point in the history
* Only copy Transport exported fields

* Do not skip the copylocks `go vet` check

* Re-separate grove and ATC library imports
  • Loading branch information
zrhoffman committed May 27, 2021
1 parent 1ea2b53 commit 3989b50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/go.vet.yml
Expand Up @@ -48,8 +48,4 @@ jobs:
- name: Install modules
run: go mod vendor -v
- name: go vet
run: |
skip_analyzers=(
-copylocks=false
)
go vet "${skip_analyzers[@]}" ./...
run: go vet ./...
5 changes: 0 additions & 5 deletions .golangci.yml
Expand Up @@ -29,8 +29,3 @@ linters:
disable-all: true
enable:
- govet

linters-settings:
govet:
disable:
- copylocks
3 changes: 2 additions & 1 deletion grove/remap/remap.go
Expand Up @@ -497,7 +497,8 @@ func makeTo(tosJSON []RemapRuleToJSON, rule remapdata.RemapRule, baseTransport *
return nil, fmt.Errorf("error parsing to %v proxy_url: %v", to.URL, toJSON.ProxyURL)
}
to.ProxyURL = proxyURL
newTransport := *baseTransport
// See b7953cc239 for the reasoning behind copying the Transport.
newTransport := *baseTransport.Clone()
if proxyURL != nil && proxyURL.Host != "" {
newTransport.Proxy = http.ProxyURL(proxyURL)
}
Expand Down

0 comments on commit 3989b50

Please sign in to comment.