src/server/pkg/collection/collection.go
func (c *readWriteCollection) getMultiIndexPaths(val interface{}, index *Index, key string) []string {
	var indexPaths []string
	field := reflect.Indirect(reflect.ValueOf(val)).FieldByName(index.Field)
	for i := 0; i < field.Len(); i++ {
		indexPaths = append(indexPaths, c.indexPath(index, field.Index(i).Interface(), key))
	}
	return indexPaths
}
func (c *readWriteCollection) getMultiIndexPaths(val interface{}, index *Index, key string) []string {
	var indexPaths []string
	field := reflect.Indirect(reflect.ValueOf(val)).FieldByName(index.Field)
	for i := 0; i < field.Len(); i++ {
		indexPaths = append(indexPaths, c.indexPath(index, field.Index(i).Interface(), key))
	}
	return indexPaths
}
func ( c * readWriteCollection ) getMultiIndexPaths ( val interface { } , index * Index , key string ) [ ] string { var indexPaths [ ] string field := reflect . Indirect ( reflect . ValueOf ( val ) ) . FieldByName ( index . Field ) for i := 0 ; i < field . Len ( ) ; i ++ { indexPaths = append ( indexPaths , c . indexPath ( index , field . Index ( i ) . Interface ( ) , key ) ) } return indexPaths }
// Giving a value, a multi-index, and the key of the item, return the
// paths under which the multi-index items should be stored.
Giving a value a multi - index and the key of the item return the paths under which the multi - index items should be stored .