goproxy icon indicating copy to clipboard operation
goproxy copied to clipboard

Fix `go vet` warnings

Open jabley opened this issue 8 years ago • 5 comments

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 avatar Aug 19 '16 08:08 jabley

Hi! Did you see my comment? Am I correct?

elazarl avatar Aug 24 '16 19:08 elazarl

I think using this should address it, once Go 1.8 is out.

jabley avatar Dec 08 '16 08:12 jabley

Can you please update the PR to clone the tls.Config?

Thanks

On Thu, Dec 8, 2016 at 10:16 AM, James Abley [email protected] 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 https://github.com/elazarl/goproxy/pull/181#issuecomment-265679941, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP4okAarzBtHLIsY2Hezjal-m5Cfw0Dks5rF7zXgaJpZM4JoRit .

elazarl avatar Dec 13 '16 07:12 elazarl

Will do, once Go 1.8 is out in January 2017.

jabley avatar Dec 13 '16 14:12 jabley

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 [email protected] 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 https://github.com/elazarl/goproxy/pull/181#issuecomment-266749148, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP4ouPxEvOHnbpvDVCoSYVy8Z5Mf-Cmks5rHqjRgaJpZM4JoRit .

elazarl avatar Dec 13 '16 14:12 elazarl