You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ro...@apache.org on 2021/05/27 20:59:37 UTC
[trafficcontrol] branch master updated: Only copy Transport
exported fields (#5844)
This is an automated email from the ASF dual-hosted git repository.
rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 3989b50 Only copy Transport exported fields (#5844)
3989b50 is described below
commit 3989b50e8ccd63fccbffe995186235a60f1f06f3
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Thu May 27 14:58:16 2021 -0600
Only copy Transport exported fields (#5844)
* Only copy Transport exported fields
* Do not skip the copylocks `go vet` check
* Re-separate grove and ATC library imports
---
.github/workflows/go.vet.yml | 6 +-----
.golangci.yml | 5 -----
grove/remap/remap.go | 3 ++-
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/go.vet.yml b/.github/workflows/go.vet.yml
index a62d32f..98cfc06 100644
--- a/.github/workflows/go.vet.yml
+++ b/.github/workflows/go.vet.yml
@@ -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 ./...
diff --git a/.golangci.yml b/.golangci.yml
index 58a5ef5..0576d5b 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -29,8 +29,3 @@ linters:
disable-all: true
enable:
- govet
-
-linters-settings:
- govet:
- disable:
- - copylocks
diff --git a/grove/remap/remap.go b/grove/remap/remap.go
index 6840c33..ed8ab4d 100644
--- a/grove/remap/remap.go
+++ b/grove/remap/remap.go
@@ -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)
}