code: func NewNamedMapping(logger logging.Logger, title string,
  	indexFunction IndexFunction) idxmap.NamedMappingRW {
  	mem := memNamedMapping{}
  	mem.Logger = logger
  	mem.nameToIdx = map[string]*mappingItem{}
  	mem.indexes = map[string]map[string]*nameSet{}
  	mem.createIndexes = indexFunction
  	mem.title = title
  	return &mem
  }
docs: // NewNamedMapping creates a new instance of the in-memory implementation
  // of idxmap.NamedMappingRW
  // An index function that builds secondary indexes for an item can be defined
  // and passed as <indexFunction>.