Skip to content

add hmap.Iterate()#2

Open
fy0 wants to merge 2 commits intodustinxie:masterfrom
fy0:pr-branch
Open

add hmap.Iterate()#2
fy0 wants to merge 2 commits intodustinxie:masterfrom
fy0:pr-branch

Conversation

@fy0
Copy link

@fy0 fy0 commented Apr 7, 2022

It's a shortcut version for for k, v := range:

m.Iterate(func(_k interface{}, _v interface{}) error {
	k := _k.(string)
	v := _v.(int64)
	// do something
    return nil
})

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

Successfully merging this pull request may close these issues.

1 participant