Closed godcong closed 2 years ago
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
@godcong this feature has been added with https://github.com/alphadose/haxmap/commit/f4af9b50631e3c27e0f1aa5ae8faf8c09f9fc564
will publish a new release soon with some more fixes
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.
Like in sync.Map I can return false to stop the iteration