I'm trying to come up with a data structure that I can search for map values quickly without having to iterate an entire (and large) map to find a value.
Essentially I have a map that contains lots of data and the key is the primary identifier where most of the lookups go to. This is very quick to lookup and/or fail. I also have some very frequent queries to search for values inside the map. This is slow at the moment as I have to iterate the entire map to look for a value. What I am trying to do is to create a "shadow" map that has a reference to the pointer. This way when the original is deleted from the primary map it should/will fall off from the shadow map. However as you cannot set a struct to nil this doesn't seem to work. https://play.golang.org/p/xUP-LEruwVX Any ideas on how I could approach this? Thanks!! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.