We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Let's suppose I need to get all elements from A that don't appear in B slice (difference), but comparing only the name.
package main import ( "fmt" "github.com/wesovilabs/koazee" ) type product struct { code int name string } var fruits1 = []*product{ {code: 9, name: "apple"}, {code: 4, name: "orange"}, {code: 12, name: "lemon"}, } var fruits2 = []*product{ {code: 1000, name: "apple"}, // The code 1000 is intentional!! I need to compare only by name } func main() { stream := koazee.StreamOf(fruits1) // ?? stream.ForEach(func(p *product) { fmt.Printf("%d: \"%s\"\n", p.code, p.name) }).Do() }
Should print
4: "orange" 12: "lemon
I'm trying to figure out a good way to do that using koazee.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Let's suppose I need to get all elements from A that don't appear in B slice (difference), but comparing only the name.
Should print
I'm trying to figure out a good way to do that using koazee.
The text was updated successfully, but these errors were encountered: