Hi, I come from the .NET world where I had LINQ so i could do in memory
queries like the one we usually see in SQL.
I have a slice of this structure I want to group by 8 fields, and then sum
another integer field. Something like:
type Register struct {
id1 int
id2 int
id3 int
id4 int
id5 int
id6 int
id7 int
id8 int
money int
}
I thought in:
1. Creating an Equal function, to compare structures (those eight
fields).
2. Iterate over the collection I'm analyzing.
1. For each item check if it is already in the hash table.
2. If it is there => I sum the field.
3. If it is not => I add the new item to hash table.
Is there a better way or any beautiful, perforfomant and easy ready to use
library?
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.