Skip to content
New issue

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

Iterate(ForEach) has no way to break #10

Closed
godcong opened this issue Sep 6, 2022 · 1 comment
Closed

Iterate(ForEach) has no way to break #10

godcong opened this issue Sep 6, 2022 · 1 comment

Comments

@godcong
Copy link

godcong commented Sep 6, 2022

In the case of a lot of data, I need to stop this iteration after I get a piece of data.
But there is no way to top in the current iteration.

		syncmaps.Range(func(key, value any) bool {
		
			if ok {
	
				return false
			}
			return true
		})

Like in sync.Map I can return false to stop the iteration

@alphadose
Copy link
Owner

@godcong this feature has been added with f4af9b5

will publish a new release soon with some more fixes

@godcong godcong closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants