ipld-eth-server/vendor/github.com/fjl/memsize/mapiter_go12.go
2019-09-25 16:32:30 -05:00

13 lines
186 B
Go

// +build go1.12
package memsize
import "reflect"
func iterateMap(m reflect.Value, fn func(k, v reflect.Value)) {
it := m.MapRange()
for it.Next() {
fn(it.Key(), it.Value())
}
}