You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spent some time today debugging an issue, which came down to trying to Get an expvar key that doesn't exist.
I would expect expvar.Get("unregistered-key") to panic, just like trying to publish a duplicate key would do. If not, the documentation should be more explicit that Getting a non-existing key will return nil.
The text was updated successfully, but these errors were encountered:
bradfitz
changed the title
expvar.Get should probably error for a missing key
expvar: document Get miss behavior
Jan 30, 2016
Spent some time today debugging an issue, which came down to trying to Get an expvar key that doesn't exist.
I would expect expvar.Get("unregistered-key") to panic, just like trying to publish a duplicate key would do. If not, the documentation should be more explicit that Getting a non-existing key will return nil.
The text was updated successfully, but these errors were encountered: