PSA: juju/utils/set/{Strings, Tags} cannot be used without initalisation
David Cheney
david.cheney at canonical.com
Wed Nov 12 00:54:11 UTC 2014
Hello,
If you use set.Strings, or set.Tags, please be aware of this issue
https://github.com/juju/utils/pull/84
The underlying problem is the lazy initialisation would not work in
all cases and could cause data written to a set to be dropped. Please
refer to the pull request for details.
The code has been changed to panic if this unsafe condition is encounted
The fix in code (which i'll land in a followup branch) is to replace
var s set.Strings
s.Add("something")
with
s := set.NewStrings()
Cheers
Dave
More information about the Juju-dev
mailing list