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 caller package name #1102
Fix caller package name #1102
Conversation
Should there be different implementations for Go < 1.14, and Go 1.14 and up? |
I think https://go-review.googlesource.com/c/go/+/219118/ should be related. |
2548627
to
105b71d
Compare
That indicates it should be fixed in the go1.14 final? Is this still an issue in go1.14 (non-rc?) |
entry.go
Outdated
@@ -419,3 +426,7 @@ func (entry *Entry) sprintlnn(args ...interface{}) string { | |||
msg := fmt.Sprintln(args...) | |||
return msg[:len(msg)-1] | |||
} | |||
|
|||
func golang1_14() bool { | |||
return strings.HasPrefix(runtime.Version(), goVersion1_14) |
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.
If this fix is still needed on go1.14 final, it's cleaner to use build tags for this instead of determining go version at runtime; have a file that has a !go1.14
build-tag for older go versions, and an implementation in a file with a go1.14
build-tag for the current version.
See https://github.com/docker/go-connections/pull/68/files for an example
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.
👍 Updated, please review again.
105b71d
to
7356634
Compare
7356634
to
86a84a9
Compare
Thanks! Last version SGTM (but haven't checked on both go1.13 and go1.14 final) |
I was wrong, that cl wasn't related 😅 |
when it will be merged? this bug is critical for me and my colleagues |
Thanks for your contributions |
thanks for fix! |
Fix caller package name
Fix #1089
This is identical to #1099