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
client: transport: fix tlsconfig Clone() on different Golang versions #26406
Conversation
bd93b8a
to
fecca8a
Compare
@AkihiroSuda actually it seems that go1.7 has tls.Config.clone, so can we use this directly and use tls.Config.Clone for go version >=1.8, and for go version <=1.6, we can use the code in tlsconfig_clone_go17.go, |
@feilengcui008 |
@AkihiroSuda sorry, I didn't notice this...another thing is can we use the !go1.6 and !go1.7 in tlsconfig_clone.go instead of go1.8 since we can avoid continuing adding go1.9... if go upstream doesn't change this interface |
Why not use |
@justincormack yes, I was just actually thinking that 😃 |
I feel this is still needed though since I'm not able to compile anymore and #26410 |
make manpages
@AkihiroSuda could you please edit the commit message? |
@justincormack @crosbymichael Golang in Fedora 23 is still at Go 1.5.4 (http://koji.fedoraproject.org/koji/packageinfo?packageID=16224) for us still and in F24 we're at Go 1.6.x |
fecca8a
to
8f4462b
Compare
@runcom done @feilengcui008 poc:
|
@@ -0,0 +1,13 @@ | |||
// +build go1.6 | |||
// +build !go1.7 |
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.
can you move these build tags to the same line? or why is this needed at all? isn't it enough to say only build for go1.6
?
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.
@crosbymichael go1.6
actually means go1.6+
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.
The line means go1.6 && !go1.7
.
If we split the line it would become go1.6 || !go1.7
https://golang.org/pkg/go/build/
And even on Go 1.7, the go1.6
tag is true, that's why we need !go1.7
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.
+1 thanks
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.
in one line it would be go1.6,!go1.7
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.
thank you, updated
8f4462b
to
c0cb172
Compare
Can it be delayed until Ubuntu 16.10 Yakkety Yak that provides Go 1.7 is released (for other archs)? |
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
c0cb172
to
128cefc
Compare
@@ -1,4 +1,4 @@ | |||
// +build !go1.7,!windows |
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.
I'm not sure why there was !windows
here, Clone() seems supporting windows.
golang/go@d24f446
LGTM |
LGTM |
Fix #26410
Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp