-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
expvar: Go 1.9 changes expvar.Map.Init() #21619
Comments
CC @bcmills The |
Either seems fine by me. I have a slight preference for documenting Perhaps I am missing something, but what's the use-case for the old behavior? (Why does the test need to clear the existing map rather than allocating a new one?) |
There's no way to replace a map registered by expvar.NewMap. |
Change https://golang.org/cl/62370 mentions this issue: |
This is fixed at head. @ianlancetaylor, are there instructions somewhere on how to backport a patch to the 1.9.1 branch? |
I am in no way a git export, and I don't know of any written instructions. What I do is, after the CL has been committed to tip,
Here is the git revision number for the change to tip. The second There is probably some more clever way to do this. |
thanks! |
CL 62370 OK for Go 1.9.2. |
Change https://golang.org/cl/70973 mentions this issue: |
fixes #21619 Change-Id: I5bb513dfc8cac875b06a262eec40b5863ae23a4c Reviewed-on: https://go-review.googlesource.com/62370 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/70973 Run-TryBot: Russ Cox <rsc@golang.org>
go1.9.2 has been packaged and includes: The release is posted at golang.org/dl. — golang.org/x/build/cmd/releasebot, Oct 26 21:09:08 UTC |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.9
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
What did you see instead?
Note
The behavior is changed at fb0fe42#diff-e4fb3a2d42311171535831443fb1fca2R128.
I want a way to clear expvar.Map.
I used it in tests.
The text was updated successfully, but these errors were encountered: