-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix go vet
warnings
#181
Closed
Closed
Fix go vet
warnings
#181
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These were noticed using Go 1.7. Earlier versions may not have had all of these issues. - https.go:376: assignment copies lock value to config: crypto/tls.Config contains sync.Once contains sync.Mutex - examples/goproxy-yui-minify/yui.go:79: io.LimitedReader composite literal uses unkeyed fields - proxy_test.go:508: unreachable code - transport/transport.go:308: unreachable code - transport/transport.go:658: unreachable code
jabley
added a commit
to jabley/countryproxy
that referenced
this pull request
Aug 19, 2016
@@ -373,14 +373,14 @@ func (proxy *ProxyHttpServer) NewConnectDialToProxy(https_proxy string) func(net | |||
|
|||
func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *ProxyCtx) (*tls.Config, error) { | |||
return func(host string, ctx *ProxyCtx) (*tls.Config, error) { | |||
config := *defaultTLSConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that a bug? You leak the defaultTLSConfig, and users can change it by mistake.
Hi! |
I think using this should address it, once Go 1.8 is out. |
Can you please update the PR to clone the tls.Config?
Thanks
…On Thu, Dec 8, 2016 at 10:16 AM, James Abley ***@***.***> wrote:
I think using this should address it
<https://go.googlesource.com/go/+/d24f446a90ea94b8>, once Go 1.8 is out.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#181 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAP4okAarzBtHLIsY2Hezjal-m5Cfw0Dks5rF7zXgaJpZM4JoRit>
.
|
Will do, once Go 1.8 is out in January 2017. |
Wait. I'm not sure abandoning support in old go versions is a good idea.
…On Tue, Dec 13, 2016, 4:16 PM James Abley ***@***.***> wrote:
Will do, once Go 1.8 is out in January 2017.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#181 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAP4ouPxEvOHnbpvDVCoSYVy8Z5Mf-Cmks5rHqjRgaJpZM4JoRit>
.
|
Fixed in #595 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These were noticed using Go 1.7. Earlier versions may not have had all
of these issues.
crypto/tls.Config contains sync.Once contains sync.Mutex
literal uses unkeyed fields