You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: map.go
    path of file: ./repos/goutil/reflects
    
    the code of the file until where you have to start completion: package reflects

import (
	"reflect"
	"strconv"
)

// EachMap 
    
func flatSlice(rv reflect.Value, fn FlatFunc, parent string) {
	for i := 0; i < rv.Len(); i++ {
		path := parent + "[" + strconv.Itoa(i) + "]"
		fv := Indirect(rv.Index(i))

		switch fv.Kind() {
		case reflect.Map:
			flatMap(fv, fn, path)
		case reflect.Array, reflect.Slice:
			flatSlice(fv, fn, path)
		default:
			fn(path, fv)
		}
	}
}